-
1
Mongoid.load!("config/mongoid.yml", :test) unless (Mongoid.configured? || !File.exists?("config/mongoid.yml"))
-
# config/initializers/mongoid-history.rb
-
# initializer for mongoid-history
-
# assuming HistoryTracker is your tracker class
-
1
Mongoid::History.tracker_class_name = :history_tracker
-
# Top level include file that brings in all the necessary code
-
1
require 'bundler/setup'
-
1
require 'rubygems'
-
1
require 'yaml'
-
1
require 'mongoid'
-
1
require 'erubis'
-
1
require 'nokogiri'
-
1
require 'mongoid-history'
-
1
require 'date_time_precision'
-
1
require 'date_time_precision/format/iso8601'
-
1
require 'mime/types'
-
1
require 'bcp47'
-
-
1
Moped::BSON = BSON
-
-
#require_relative File.join('..','lib','formats','import','utilities.rb')
-
-
1
root = File.expand_path '..', File.dirname(File.absolute_path(__FILE__))
-
-
1
Dir.glob(File.join(root, 'lib','formats','*.rb')).each do |file|
-
1
require file
-
end
-
-
1
Dir.glob(File.join(root, 'lib','formats','import','*.rb')).each do |file|
-
1
require file
-
end
-
-
1
Dir.glob(File.join(root, 'lib','formats','import','**','*.rb')).each do |file|
-
114
require file
-
end
-
-
1
Dir.glob(File.join(root, 'lib','formats','export','*.rb')).each do |file|
-
5
require file
-
end
-
-
1
Dir.glob(File.join(root, 'lib','formats','export','**','*.rb')).each do |file|
-
5
require file
-
end
-
-
1
require_relative File.join(root, 'lib','models','any_type.rb')
-
1
require_relative File.join(root, 'lib','models','history_tracker.rb')
-
1
require_relative File.join(root, 'lib','models','extensions','element.rb')
-
1
require_relative File.join(root, 'lib','models','extensions','resource.rb')
-
1
Dir.glob(File.join(root, 'lib','models','**','*.rb')).each do |file|
-
121
require file
-
end
-
1
require_relative File.join('..','config','initializers','mongoid_history.rb')
-
1
require_relative File.join('..','config','initializers','mongo.rb')
-
1
module FHIR
-
1
module Export
-
1
class ModelSerializer
-
1
DEFAULTS={
-
is_root: true,
-
is_lowercase: false
-
}
-
1
def initialize
-
23913
template_helper = TemplateHelper.new
-
23913
@rendering_context = RenderingContext.new
-
23913
@rendering_context.template_helper = template_helper
-
end
-
-
1
def serialize(model, options={})
-
23913
options = DEFAULTS.merge(options)
-
23913
options[:model] = model
-
23913
@rendering_context.render(:template => model.class.name.demodulize.downcase, :locals => options).gsub /^\s*$\n/, ''
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Export
-
-
# Used to actually render stuff. A RenderingContext needs to be set up with
-
# a template helper and may be provided with extensions.
-
#
-
# :call-seq:
-
# template_helper = FHIR::Export::TemplateHelper.new
-
# rendering_context = FHIR::Export::RenderingContext.new
-
# rendering_context.template_helper = template_helper
-
# rendering_context.extensions = [FHIR::Export::Helper::XMLTemplateHelper]
-
#
-
1
class RenderingContext < OpenStruct
-
1
attr_accessor :template_helper, :extensions
-
-
1
def my_binding
-
376403
binding
-
end
-
-
1
def render(params)
-
376403
erb = nil
-
376403
ident = nil
-
376403
if params[:template]
-
376403
erb = @template_helper.template(params[:template])
-
elsif params[:partial]
-
erb = @template_helper.partial(params[:partial])
-
if params[:collection]
-
ident = params[:id] || params[:partial]
-
end
-
end
-
-
376403
collection = params[:collection] || [true]
-
collection.map do |item|
-
376403
locals = params[:locals]
-
376403
locals ||= {}
-
376403
if ident
-
locals[ident] = item
-
end
-
376403
rendering_context = RenderingContext.new(locals)
-
376403
rendering_context.template_helper = @template_helper
-
376403
if @extensions.present?
-
rendering_context.extensions = @extensions
-
@extensions.each do |extension|
-
rendering_context.extend(extension)
-
end
-
end
-
376403
erb.result(rendering_context.my_binding)
-
376403
end.join
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Export
-
# Class that finds ERb templates. Here is how it can be configured:
-
1
class TemplateHelper
-
1
def initialize()
-
23913
@template_cache = {}
-
23913
@template_format = 'xml'
-
end
-
-
1
def template_root
-
376403
@template_directory ||= File.join(File.dirname(__FILE__), 'templates')
-
376403
@template_directory
-
end
-
-
# Returns the raw ERb for the template_name provided. This method will look in
-
# template_directory/template_subdir/template_name.template_format.erb
-
1
def template(template_name)
-
376403
cache_template(template_name)
-
end
-
-
# Basically the same template, but prepends an underscore to the template name
-
# to mimic the Rails convention for template fragments
-
1
def partial(partial_name)
-
cache_template("_#{partial_name}")
-
end
-
-
1
protected
-
-
1
def cache_template(template_name)
-
376403
entry = @template_cache[template_name] || {mtime:-1, erb:nil}
-
376403
filename = File.join(template_root, "#{template_name}.#{@template_format}.erb")
-
376403
mtime = File.mtime(filename).to_i
-
376403
if mtime > entry[:mtime]
-
141676
src = File.read(filename)
-
141676
erb = Erubis::EscapedEruby.new(src)
-
141676
erb.filename=filename
-
141676
entry[:mtime]=mtime
-
141676
entry[:erb] = erb
-
141676
@template_cache[template_name]=entry
-
end
-
376403
entry[:erb]
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Serializer
-
1
module Utilities
-
-
1
def to_xml(options={})
-
23913
FHIR::Export::ModelSerializer.new.serialize(self, options)
-
end
-
-
# Export FHIR Resources as FHIR JSON
-
1
def to_fhir_json
-
5622
h = massageHash(self,true)
-
5622
JSON.pretty_unparse(h)
-
end
-
-
# Massage the Class/Hash:
-
# - Strip out the Mongoid "_id" structures
-
# - Strip out nil values
-
# - Strip out empty arrays
-
# - Add W3C namespace to <div/> tags
-
1
def massageHash(h,top)
-
113416
resourceType = nil
-
-
# if this is a FHIR class, convert to a hash
-
113416
if is_fhir_class?(h.class.name)
-
113416
resourceType = h.class.name.demodulize
-
113416
hash = Marshal.load(Marshal.dump(h.attributes))
-
116244
hash['extension'] = h.extension.map {|e|build_extension_hash(e)}
-
113488
hash['modifierExtension'] = h.modifierExtension.map {|e|build_extension_hash(e)}
-
116396
hash['entry'] = h.entry.map {|e|build_entry_hash(e)} if h.respond_to?(:entry)
-
113416
h = hash
-
end
-
-
# remove "_id" attributes
-
113416
h.delete('_id')
-
-
# hash for renamed attributes
-
113416
renamed = {}
-
-
# loop through all the entries in the hash
-
113416
h.each do |key,value|
-
597130
if ['extension','modifierExtension','entry'].include?(key)
-
226926
h.delete(key) if value.empty?
-
226926
next
-
end
-
-
370204
if key=='primitiveExtension'
-
42
value.each do |pe|
-
42
if pe['extension'].size == 1
-
34
renamed[ pe['path'] ] = { 'extension' => [ build_extension_hash( pe['extension'][0]) ] }
-
else
-
8
renamed[ pe['path'] ] = pe['extension'].map do | extension |
-
16
next extension if extension.nil?
-
8
{ 'extension' => [ build_extension_hash(extension)] }
-
end
-
end
-
end
-
42
h.delete(key)
-
42
next
-
end
-
-
# massage entries that are also hashes...
-
370162
if value.is_a? Hash
-
h[key] = massageHash(value,false)
-
# massage entries that are arrays...
-
elsif value.is_a? Array
-
# replace each item in the array...
-
76857
value.map! do |item|
-
63764
if item.is_a? Hash
-
next massageHash(item,false) # .. with a massaged hash
-
# serialize FHIR children correctly
-
elsif is_fhir_class?(item.class.name)
-
58560
next massageHash(item, (key=='contained') ) # .. with a hash representation of an object
-
else
-
5204
next item # .. or with the item itself (probably primitive data type)
-
end
-
end
-
# after massaging the array, remove empty arrays
-
76857
if value.empty?
-
38123
h.delete(key)
-
end
-
# remove empty attributes
-
elsif value.nil?
-
39721
h.delete(key)
-
# massage AnyTypes
-
elsif value.class.name == 'FHIR::AnyType'
-
4
renamed["#{key}#{value.type}"] = value.value
-
4
renamed["#{key}#{value.type}"] = to_num(value.value) if ['integer','positiveint','unsignedint','decimal'].include?(value.type.downcase)
-
4
renamed["#{key}#{value.type}"] = massageHash(value.value,false) if is_fhir_class?(value.value.class.name)
-
4
h.delete(key)
-
# massage entries that are FHIR classes...
-
elsif is_fhir_class?(value.class.name)
-
46254
h[key] = massageHash(value,false)
-
else
-
#puts "Ignoring '#{key}' inside '#{value.class.name}' of type '#{value.class.name}'"
-
end
-
end # eof h.each
-
-
113416
h.merge!(renamed) if !renamed.empty?
-
-
# if this is a FHIR class, add the 'resourceType' attribute
-
113416
if top and !resourceType.nil?
-
13236
h['resourceType'] = resourceType
-
end
-
-
113416
fix_all_keys(h)
-
end # eof massageHash method
-
-
1
def build_extension_hash(e)
-
3650
extension_hash = {}
-
3650
extension_hash['id']=e.xmlId if e.xmlId
-
3650
extension_hash['url']=e.url if !e.url.nil?
-
4358
extension_hash['extension'] = e.extension.map {|e|build_extension_hash(e)} if(e.extension && e.extension.any?)
-
3650
extension_hash['modifierExtension'] = e.modifierExtension.map {|e|build_extension_hash(e)} if(e.modifierExtension && e.modifierExtension.any?)
-
-
# render template element
-
# <%== render :template => 'element', :locals => {model: model, is_resource: false} %>
-
3650
if !e.value.nil?
-
3294
any = e.value
-
27115
if FHIR::AnyType::PRIMITIVES.any?{|x|x.downcase == e.value.type.downcase}
-
# <value<%= model.valueType() %> value="<%= model.value()[:value] %>"/>
-
1886
x = any.value
-
1886
x = any.value[:value] if any.value.is_a? Hash
-
-
1886
if any.type.downcase == 'boolean'
-
60
if x.is_a?(TrueClass) || x.is_a?(FalseClass)
-
30
extension_hash["value#{e.value.type}"] = x
-
else
-
30
extension_hash["value#{e.value.type}"] = (x=='true')
-
end
-
elsif ['integer','positiveint','unsignedint','decimal'].include?(any.type.downcase)
-
898
if x.is_a?(Fixnum) || x.is_a?(Float)
-
542
extension_hash["value#{e.value.type}"] = x
-
else
-
356
extension_hash["value#{e.value.type}"] = to_num(x)
-
end
-
else
-
928
extension_hash["value#{e.value.type}"] = x
-
end
-
5472
elsif FHIR::AnyType::DATE_TIMES.any?{|x|x.downcase == e.value.type.downcase}
-
# <value<%= model.valueType() %> value="<%= model.value()[:value] %>"/>
-
72
if any.value.is_a? Hash
-
extension_hash["value#{e.value.type}"] = any.value[:value]
-
else
-
72
extension_hash["value#{e.value.type}"] = any.value
-
end
-
else
-
# model.value()[:value].to_xml(is_root: false, name: "value#{model.valueType()}")%>
-
1336
if any.value.methods.include? :to_fhir_json
-
1336
contained = JSON.parse(any.value.to_fhir_json)
-
1336
contained.delete('resourceType')
-
1336
extension_hash["value#{any.type}"] = contained
-
elsif any.value[:value].methods.include? :to_fhir_json
-
contained = JSON.parse(any.value[:value].to_fhir_json)
-
contained.delete('resourceType')
-
extension_hash["value#{any.type}"] = contained
-
end
-
end
-
end
-
3650
extension_hash
-
end
-
-
# Convert string to Fixnum or Float as appropriate
-
1
def to_num(v)
-
360
((float = Float(v)) && (float % 1.0 == 0) ? float.to_i : float) rescue v
-
end
-
-
1
def build_entry_hash(e)
-
2980
entry_hash = massageHash(e,true)
-
2980
resourceType = entry_hash['resourceType']
-
2980
entry_hash.delete('resourceType')
-
2980
if e.methods.include?(:resource) && e.resource.methods.include?(:to_fhir_json)
-
1400
entry_hash['resource'] = JSON.parse(e.resource.to_fhir_json)
-
elsif e[:resource].methods.include? :to_fhir_json
-
1400
entry_hash['resource'] = JSON.parse(e[:resource].to_fhir_json)
-
end
-
2980
entry_hash
-
end
-
-
end
-
end
-
end
-
1
module FHIR
-
1
module Export
-
1
module Helper
-
1
module XMLTemplateHelper
-
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Account
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
return nil unless entry
-
model = self.new
-
self.parse_element_data(model, entry)
-
self.parse_resource_data(model, entry)
-
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
parse_primitive_field(model,entry,'name','name',false)
-
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
parse_primitive_field(model,entry,'status','status',false)
-
set_model_data(model, 'activePeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:activePeriod')))
-
set_model_data(model, 'currency', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:currency')))
-
set_model_data(model, 'balance', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:balance')))
-
set_model_data(model, 'coveragePeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:coveragePeriod')))
-
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
set_model_data(model, 'owner', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:owner')))
-
parse_primitive_field(model,entry,'description','description',false)
-
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Address
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
1040
return nil unless entry
-
920
model = self.new
-
920
self.parse_element_data(model, entry)
-
920
parse_primitive_field(model,entry,'use','use',false)
-
920
parse_primitive_field(model,entry,'type','fhirType',false)
-
920
parse_primitive_field(model,entry,'text','text',false)
-
920
parse_primitive_field(model,entry,'line','line',true)
-
920
parse_primitive_field(model,entry,'city','city',false)
-
920
parse_primitive_field(model,entry,'district','district',false)
-
920
parse_primitive_field(model,entry,'state','state',false)
-
920
parse_primitive_field(model,entry,'postalCode','postalCode',false)
-
920
parse_primitive_field(model,entry,'country','country',false)
-
920
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
920
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module AllergyIntolerance
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_AllergyIntoleranceReactionComponent(entry)
-
40
return nil unless entry
-
40
model = FHIR::AllergyIntolerance::AllergyIntoleranceReactionComponent.new
-
40
self.parse_element_data(model, entry)
-
40
set_model_data(model, 'substance', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:substance')))
-
40
parse_primitive_field(model,entry,'certainty','certainty',false)
-
80
set_model_data(model, 'manifestation', entry.xpath('./fhir:manifestation').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
40
parse_primitive_field(model,entry,'description','description',false)
-
40
parse_primitive_field(model,entry,'onset','onset',false)
-
40
parse_primitive_field(model,entry,'severity','severity',false)
-
40
set_model_data(model, 'exposureRoute', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:exposureRoute')))
-
40
set_model_data(model, 'note', FHIR::Annotation.parse_xml_entry(entry.at_xpath('./fhir:note')))
-
40
model
-
end
-
-
1
def parse_xml_entry(entry)
-
32
return nil unless entry
-
32
model = self.new
-
32
self.parse_element_data(model, entry)
-
32
self.parse_resource_data(model, entry)
-
56
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
32
parse_primitive_field(model,entry,'onset','onset',false)
-
32
parse_primitive_field(model,entry,'recordedDate','recordedDate',false)
-
32
set_model_data(model, 'recorder', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:recorder')))
-
32
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
32
set_model_data(model, 'reporter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:reporter')))
-
32
set_model_data(model, 'substance', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:substance')))
-
32
parse_primitive_field(model,entry,'status','status',false)
-
32
parse_primitive_field(model,entry,'criticality','criticality',false)
-
32
parse_primitive_field(model,entry,'type','fhirType',false)
-
32
parse_primitive_field(model,entry,'category','category',false)
-
32
parse_primitive_field(model,entry,'lastOccurence','lastOccurence',false)
-
32
set_model_data(model, 'note', FHIR::Annotation.parse_xml_entry(entry.at_xpath('./fhir:note')))
-
72
set_model_data(model, 'reaction', entry.xpath('./fhir:reaction').map {|e| parse_xml_entry_AllergyIntoleranceReactionComponent(e)})
-
32
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Annotation
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
720
return nil unless entry
-
224
model = self.new
-
224
self.parse_element_data(model, entry)
-
224
set_model_data(model, 'authorReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:authorReference')))
-
224
parse_primitive_field(model,entry,'authorString','authorString',false)
-
224
parse_primitive_field(model,entry,'time','time',false)
-
224
parse_primitive_field(model,entry,'text','text',false)
-
224
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Appointment
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_AppointmentParticipantComponent(entry)
-
80
return nil unless entry
-
80
model = FHIR::Appointment::AppointmentParticipantComponent.new
-
80
self.parse_element_data(model, entry)
-
96
set_model_data(model, 'fhirType', entry.xpath('./fhir:type').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
80
set_model_data(model, 'actor', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:actor')))
-
80
parse_primitive_field(model,entry,'required','required',false)
-
80
parse_primitive_field(model,entry,'status','status',false)
-
80
model
-
end
-
-
1
def parse_xml_entry(entry)
-
24
return nil unless entry
-
24
model = self.new
-
24
self.parse_element_data(model, entry)
-
24
self.parse_resource_data(model, entry)
-
32
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
24
parse_primitive_field(model,entry,'status','status',false)
-
24
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
24
set_model_data(model, 'reason', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:reason')))
-
24
parse_primitive_field(model,entry,'priority','priority',false)
-
24
parse_primitive_field(model,entry,'description','description',false)
-
24
parse_primitive_field(model,entry,'start','start',false)
-
24
parse_primitive_field(model,entry,'end','end',false)
-
24
parse_primitive_field(model,entry,'minutesDuration','minutesDuration',false)
-
32
set_model_data(model, 'slot', entry.xpath('./fhir:slot').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
24
parse_primitive_field(model,entry,'comment','comment',false)
-
104
set_model_data(model, 'participant', entry.xpath('./fhir:participant').map {|e| parse_xml_entry_AppointmentParticipantComponent(e)})
-
24
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module AppointmentResponse
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
16
return nil unless entry
-
16
model = self.new
-
16
self.parse_element_data(model, entry)
-
16
self.parse_resource_data(model, entry)
-
24
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
16
set_model_data(model, 'appointment', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:appointment')))
-
16
parse_primitive_field(model,entry,'start','start',false)
-
16
parse_primitive_field(model,entry,'end','end',false)
-
24
set_model_data(model, 'participantType', entry.xpath('./fhir:participantType').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
16
set_model_data(model, 'actor', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:actor')))
-
16
parse_primitive_field(model,entry,'participantStatus','participantStatus',false)
-
16
parse_primitive_field(model,entry,'comment','comment',false)
-
16
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Attachment
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
5760
return nil unless entry
-
160
model = self.new
-
160
self.parse_element_data(model, entry)
-
160
parse_primitive_field(model,entry,'contentType','contentType',false)
-
160
parse_primitive_field(model,entry,'language','language',false)
-
160
parse_primitive_field(model,entry,'data','data',false)
-
160
parse_primitive_field(model,entry,'url','url',false)
-
160
parse_primitive_field(model,entry,'size','size',false)
-
160
parse_primitive_field(model,entry,'hash','fhirHash',false)
-
160
parse_primitive_field(model,entry,'title','title',false)
-
160
parse_primitive_field(model,entry,'creation','creation',false)
-
160
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module AuditEvent
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_AuditEventEventComponent(entry)
-
64
return nil unless entry
-
64
model = FHIR::AuditEvent::AuditEventEventComponent.new
-
64
self.parse_element_data(model, entry)
-
64
set_model_data(model, 'fhirType', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
128
set_model_data(model, 'subtype', entry.xpath('./fhir:subtype').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
64
parse_primitive_field(model,entry,'action','action',false)
-
64
parse_primitive_field(model,entry,'dateTime','dateTime',false)
-
64
parse_primitive_field(model,entry,'outcome','outcome',false)
-
64
parse_primitive_field(model,entry,'outcomeDesc','outcomeDesc',false)
-
72
set_model_data(model, 'purposeOfEvent', entry.xpath('./fhir:purposeOfEvent').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
64
model
-
end
-
-
1
def parse_xml_entry_AuditEventParticipantNetworkComponent(entry)
-
96
return nil unless entry
-
48
model = FHIR::AuditEvent::AuditEventParticipantNetworkComponent.new
-
48
self.parse_element_data(model, entry)
-
48
parse_primitive_field(model,entry,'address','address',false)
-
48
parse_primitive_field(model,entry,'type','fhirType',false)
-
48
model
-
end
-
-
1
def parse_xml_entry_AuditEventParticipantComponent(entry)
-
96
return nil unless entry
-
96
model = FHIR::AuditEvent::AuditEventParticipantComponent.new
-
96
self.parse_element_data(model, entry)
-
136
set_model_data(model, 'role', entry.xpath('./fhir:role').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
96
set_model_data(model, 'reference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:reference')))
-
96
set_model_data(model, 'userId', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:userId')))
-
96
parse_primitive_field(model,entry,'altId','altId',false)
-
96
parse_primitive_field(model,entry,'name','name',false)
-
96
parse_primitive_field(model,entry,'requestor','requestor',false)
-
96
set_model_data(model, 'location', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:location')))
-
96
parse_primitive_field(model,entry,'policy','policy',true)
-
96
set_model_data(model, 'media', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:media')))
-
96
set_model_data(model, 'network', parse_xml_entry_AuditEventParticipantNetworkComponent(entry.at_xpath('./fhir:network')))
-
104
set_model_data(model, 'purposeOfUse', entry.xpath('./fhir:purposeOfUse').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
96
model
-
end
-
-
1
def parse_xml_entry_AuditEventSourceComponent(entry)
-
64
return nil unless entry
-
64
model = FHIR::AuditEvent::AuditEventSourceComponent.new
-
64
self.parse_element_data(model, entry)
-
64
parse_primitive_field(model,entry,'site','site',false)
-
64
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
112
set_model_data(model, 'fhirType', entry.xpath('./fhir:type').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
64
model
-
end
-
-
1
def parse_xml_entry_AuditEventObjectDetailComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::AuditEvent::AuditEventObjectDetailComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'type','fhirType',false)
-
8
parse_primitive_field(model,entry,'value','value',false)
-
8
model
-
end
-
-
1
def parse_xml_entry_AuditEventObjectComponent(entry)
-
80
return nil unless entry
-
80
model = FHIR::AuditEvent::AuditEventObjectComponent.new
-
80
self.parse_element_data(model, entry)
-
80
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
80
set_model_data(model, 'reference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:reference')))
-
80
set_model_data(model, 'fhirType', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
80
set_model_data(model, 'role', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:role')))
-
80
set_model_data(model, 'lifecycle', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:lifecycle')))
-
104
set_model_data(model, 'securityLabel', entry.xpath('./fhir:securityLabel').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
80
parse_primitive_field(model,entry,'name','name',false)
-
80
parse_primitive_field(model,entry,'description','description',false)
-
80
parse_primitive_field(model,entry,'query','query',false)
-
88
set_model_data(model, 'detail', entry.xpath('./fhir:detail').map {|e| parse_xml_entry_AuditEventObjectDetailComponent(e)})
-
80
model
-
end
-
-
1
def parse_xml_entry(entry)
-
64
return nil unless entry
-
64
model = self.new
-
64
self.parse_element_data(model, entry)
-
64
self.parse_resource_data(model, entry)
-
64
set_model_data(model, 'event', parse_xml_entry_AuditEventEventComponent(entry.at_xpath('./fhir:event')))
-
160
set_model_data(model, 'participant', entry.xpath('./fhir:participant').map {|e| parse_xml_entry_AuditEventParticipantComponent(e)})
-
64
set_model_data(model, 'source', parse_xml_entry_AuditEventSourceComponent(entry.at_xpath('./fhir:source')))
-
144
set_model_data(model, 'object', entry.xpath('./fhir:object').map {|e| parse_xml_entry_AuditEventObjectComponent(e)})
-
64
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Basic
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
88
return nil unless entry
-
88
model = self.new
-
88
self.parse_element_data(model, entry)
-
88
self.parse_resource_data(model, entry)
-
144
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
88
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
88
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
88
set_model_data(model, 'author', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:author')))
-
88
parse_primitive_field(model,entry,'created','created',false)
-
88
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Binary
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
24
return nil unless entry
-
24
model = self.new
-
24
self.parse_element_data(model, entry)
-
24
self.parse_resource_data(model, entry)
-
24
parse_primitive_field(model,entry,'contentType','contentType',false)
-
24
parse_primitive_field(model,entry,'content','content',false)
-
24
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module BodySite
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
8
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
8
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
32
set_model_data(model, 'fhirModifier', entry.xpath('./fhir:modifier').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
8
parse_primitive_field(model,entry,'description','description',false)
-
16
set_model_data(model, 'image', entry.xpath('./fhir:image').map {|e| FHIR::Attachment.parse_xml_entry(e)})
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Bundle
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_BundleLinkComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::Bundle::BundleLinkComponent.new
-
16
self.parse_element_data(model, entry)
-
16
parse_primitive_field(model,entry,'relation','relation',false)
-
16
parse_primitive_field(model,entry,'url','url',false)
-
16
model
-
end
-
-
1
def parse_xml_entry_BundleEntrySearchComponent(entry)
-
6976
return nil unless entry
-
16
model = FHIR::Bundle::BundleEntrySearchComponent.new
-
16
self.parse_element_data(model, entry)
-
16
parse_primitive_field(model,entry,'mode','mode',false)
-
16
parse_primitive_field(model,entry,'score','score',false)
-
16
model
-
end
-
-
1
def parse_xml_entry_BundleEntryRequestComponent(entry)
-
6976
return nil unless entry
-
40
model = FHIR::Bundle::BundleEntryRequestComponent.new
-
40
self.parse_element_data(model, entry)
-
40
parse_primitive_field(model,entry,'method','method',false)
-
40
parse_primitive_field(model,entry,'url','url',false)
-
40
parse_primitive_field(model,entry,'ifNoneMatch','ifNoneMatch',false)
-
40
parse_primitive_field(model,entry,'ifModifiedSince','ifModifiedSince',false)
-
40
parse_primitive_field(model,entry,'ifMatch','ifMatch',false)
-
40
parse_primitive_field(model,entry,'ifNoneExist','ifNoneExist',false)
-
40
model
-
end
-
-
1
def parse_xml_entry_BundleEntryResponseComponent(entry)
-
6976
return nil unless entry
-
model = FHIR::Bundle::BundleEntryResponseComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'status','status',false)
-
parse_primitive_field(model,entry,'location','location',false)
-
parse_primitive_field(model,entry,'etag','etag',false)
-
parse_primitive_field(model,entry,'lastModified','lastModified',false)
-
model
-
end
-
-
1
def parse_xml_entry_BundleEntryComponent(entry)
-
6976
return nil unless entry
-
6976
model = FHIR::Bundle::BundleEntryComponent.new
-
6976
self.parse_element_data(model, entry)
-
6976
set_model_data(model, 'link', entry.xpath('./fhir:link').map {|e| parse_xml_entry_BundleLinkComponent(e)})
-
6976
parse_primitive_field(model,entry,'fullUrl','fullUrl',false)
-
6976
entry.xpath("./fhir:resource/*").each do |e|
-
6976
model.resourceType = e.name
-
6976
v = "FHIR::#{model.resourceType}".constantize.parse_xml_entry(e) unless v
-
6976
model.resource = v
-
end
-
6976
set_model_data(model, 'search', parse_xml_entry_BundleEntrySearchComponent(entry.at_xpath('./fhir:search')))
-
6976
set_model_data(model, 'request', parse_xml_entry_BundleEntryRequestComponent(entry.at_xpath('./fhir:request')))
-
6976
set_model_data(model, 'response', parse_xml_entry_BundleEntryResponseComponent(entry.at_xpath('./fhir:response')))
-
6976
model
-
end
-
-
1
def parse_xml_entry(entry)
-
87
return nil unless entry
-
87
model = self.new
-
87
self.parse_element_data(model, entry)
-
87
self.parse_resource_data(model, entry)
-
87
parse_primitive_field(model,entry,'type','fhirType',false)
-
87
parse_primitive_field(model,entry,'total','total',false)
-
103
set_model_data(model, 'link', entry.xpath('./fhir:link').map {|e| parse_xml_entry_BundleLinkComponent(e)})
-
7063
set_model_data(model, 'entry', entry.xpath('./fhir:entry').map {|e| parse_xml_entry_BundleEntryComponent(e)})
-
87
set_model_data(model, 'signature', FHIR::Signature.parse_xml_entry(entry.at_xpath('./fhir:signature')))
-
87
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module CarePlan
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_CarePlanRelatedPlanComponent(entry)
-
return nil unless entry
-
model = FHIR::CarePlan::CarePlanRelatedPlanComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'code','code',false)
-
set_model_data(model, 'plan', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:plan')))
-
model
-
end
-
-
1
def parse_xml_entry_CarePlanParticipantComponent(entry)
-
112
return nil unless entry
-
112
model = FHIR::CarePlan::CarePlanParticipantComponent.new
-
112
self.parse_element_data(model, entry)
-
112
set_model_data(model, 'role', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:role')))
-
112
set_model_data(model, 'member', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:member')))
-
112
model
-
end
-
-
1
def parse_xml_entry_CarePlanActivityDetailComponent(entry)
-
200
return nil unless entry
-
200
model = FHIR::CarePlan::CarePlanActivityDetailComponent.new
-
200
self.parse_element_data(model, entry)
-
200
set_model_data(model, 'category', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:category')))
-
200
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
200
set_model_data(model, 'reasonCode', entry.xpath('./fhir:reasonCode').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
200
set_model_data(model, 'reasonReference', entry.xpath('./fhir:reasonReference').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
296
set_model_data(model, 'goal', entry.xpath('./fhir:goal').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
200
parse_primitive_field(model,entry,'status','status',false)
-
200
set_model_data(model, 'statusReason', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:statusReason')))
-
200
parse_primitive_field(model,entry,'prohibited','prohibited',false)
-
200
set_model_data(model, 'scheduledTiming', FHIR::Timing.parse_xml_entry(entry.at_xpath('./fhir:scheduledTiming')))
-
200
set_model_data(model, 'scheduledPeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:scheduledPeriod')))
-
200
parse_primitive_field(model,entry,'scheduledString','scheduledString',false)
-
200
set_model_data(model, 'location', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:location')))
-
272
set_model_data(model, 'performer', entry.xpath('./fhir:performer').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
200
set_model_data(model, 'productCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:productCodeableConcept')))
-
200
set_model_data(model, 'productReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:productReference')))
-
200
set_model_data(model, 'dailyAmount', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:dailyAmount')))
-
200
set_model_data(model, 'quantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:quantity')))
-
200
parse_primitive_field(model,entry,'description','description',false)
-
200
model
-
end
-
-
1
def parse_xml_entry_CarePlanActivityComponent(entry)
-
200
return nil unless entry
-
200
model = FHIR::CarePlan::CarePlanActivityComponent.new
-
200
self.parse_element_data(model, entry)
-
216
set_model_data(model, 'actionResulting', entry.xpath('./fhir:actionResulting').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
312
set_model_data(model, 'progress', entry.xpath('./fhir:progress').map {|e| FHIR::Annotation.parse_xml_entry(e)})
-
200
set_model_data(model, 'reference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:reference')))
-
200
set_model_data(model, 'detail', parse_xml_entry_CarePlanActivityDetailComponent(entry.at_xpath('./fhir:detail')))
-
200
model
-
end
-
-
1
def parse_xml_entry(entry)
-
80
return nil unless entry
-
80
model = self.new
-
80
self.parse_element_data(model, entry)
-
80
self.parse_resource_data(model, entry)
-
104
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
80
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
80
parse_primitive_field(model,entry,'status','status',false)
-
80
set_model_data(model, 'context', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:context')))
-
80
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
80
set_model_data(model, 'author', entry.xpath('./fhir:author').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
80
parse_primitive_field(model,entry,'modified','modified',false)
-
80
set_model_data(model, 'category', entry.xpath('./fhir:category').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
80
parse_primitive_field(model,entry,'description','description',false)
-
176
set_model_data(model, 'addresses', entry.xpath('./fhir:addresses').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
80
set_model_data(model, 'support', entry.xpath('./fhir:support').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
80
set_model_data(model, 'relatedPlan', entry.xpath('./fhir:relatedPlan').map {|e| parse_xml_entry_CarePlanRelatedPlanComponent(e)})
-
192
set_model_data(model, 'participant', entry.xpath('./fhir:participant').map {|e| parse_xml_entry_CarePlanParticipantComponent(e)})
-
192
set_model_data(model, 'goal', entry.xpath('./fhir:goal').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
280
set_model_data(model, 'activity', entry.xpath('./fhir:activity').map {|e| parse_xml_entry_CarePlanActivityComponent(e)})
-
80
set_model_data(model, 'note', FHIR::Annotation.parse_xml_entry(entry.at_xpath('./fhir:note')))
-
80
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Claim
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_PayeeComponent(entry)
-
return nil unless entry
-
model = FHIR::Claim::PayeeComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'fhirType', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
set_model_data(model, 'provider', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:provider')))
-
set_model_data(model, 'organization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:organization')))
-
set_model_data(model, 'person', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:person')))
-
model
-
end
-
-
1
def parse_xml_entry_DiagnosisComponent(entry)
-
return nil unless entry
-
model = FHIR::Claim::DiagnosisComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'sequence','sequence',false)
-
set_model_data(model, 'diagnosis', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:diagnosis')))
-
model
-
end
-
-
1
def parse_xml_entry_CoverageComponent(entry)
-
return nil unless entry
-
model = FHIR::Claim::CoverageComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'sequence','sequence',false)
-
parse_primitive_field(model,entry,'focal','focal',false)
-
set_model_data(model, 'coverage', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:coverage')))
-
parse_primitive_field(model,entry,'businessArrangement','businessArrangement',false)
-
set_model_data(model, 'relationship', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:relationship')))
-
parse_primitive_field(model,entry,'preAuthRef','preAuthRef',true)
-
set_model_data(model, 'claimResponse', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:claimResponse')))
-
set_model_data(model, 'originalRuleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:originalRuleset')))
-
model
-
end
-
-
1
def parse_xml_entry_SubDetailComponent(entry)
-
return nil unless entry
-
model = FHIR::Claim::SubDetailComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'sequence','sequence',false)
-
set_model_data(model, 'fhirType', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
set_model_data(model, 'service', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:service')))
-
set_model_data(model, 'quantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:quantity')))
-
set_model_data(model, 'unitPrice', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:unitPrice')))
-
parse_primitive_field(model,entry,'factor','factor',false)
-
parse_primitive_field(model,entry,'points','points',false)
-
set_model_data(model, 'net', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:net')))
-
set_model_data(model, 'udi', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:udi')))
-
model
-
end
-
-
1
def parse_xml_entry_DetailComponent(entry)
-
return nil unless entry
-
model = FHIR::Claim::DetailComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'sequence','sequence',false)
-
set_model_data(model, 'fhirType', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
set_model_data(model, 'service', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:service')))
-
set_model_data(model, 'quantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:quantity')))
-
set_model_data(model, 'unitPrice', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:unitPrice')))
-
parse_primitive_field(model,entry,'factor','factor',false)
-
parse_primitive_field(model,entry,'points','points',false)
-
set_model_data(model, 'net', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:net')))
-
set_model_data(model, 'udi', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:udi')))
-
set_model_data(model, 'subDetail', entry.xpath('./fhir:subDetail').map {|e| parse_xml_entry_SubDetailComponent(e)})
-
model
-
end
-
-
1
def parse_xml_entry_ProsthesisComponent(entry)
-
return nil unless entry
-
model = FHIR::Claim::ProsthesisComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'initial','initial',false)
-
parse_primitive_field(model,entry,'priorDate','priorDate',false)
-
set_model_data(model, 'priorMaterial', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:priorMaterial')))
-
model
-
end
-
-
1
def parse_xml_entry_ItemsComponent(entry)
-
return nil unless entry
-
model = FHIR::Claim::ItemsComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'sequence','sequence',false)
-
set_model_data(model, 'fhirType', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
set_model_data(model, 'provider', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:provider')))
-
parse_primitive_field(model,entry,'diagnosisLinkId','diagnosisLinkId',true)
-
set_model_data(model, 'service', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:service')))
-
parse_primitive_field(model,entry,'serviceDate','serviceDate',false)
-
set_model_data(model, 'quantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:quantity')))
-
set_model_data(model, 'unitPrice', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:unitPrice')))
-
parse_primitive_field(model,entry,'factor','factor',false)
-
parse_primitive_field(model,entry,'points','points',false)
-
set_model_data(model, 'net', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:net')))
-
set_model_data(model, 'udi', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:udi')))
-
set_model_data(model, 'bodySite', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:bodySite')))
-
set_model_data(model, 'subSite', entry.xpath('./fhir:subSite').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
set_model_data(model, 'fhirModifier', entry.xpath('./fhir:modifier').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
set_model_data(model, 'detail', entry.xpath('./fhir:detail').map {|e| parse_xml_entry_DetailComponent(e)})
-
set_model_data(model, 'prosthesis', parse_xml_entry_ProsthesisComponent(entry.at_xpath('./fhir:prosthesis')))
-
model
-
end
-
-
1
def parse_xml_entry_MissingTeethComponent(entry)
-
return nil unless entry
-
model = FHIR::Claim::MissingTeethComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'tooth', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:tooth')))
-
set_model_data(model, 'reason', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:reason')))
-
parse_primitive_field(model,entry,'extractionDate','extractionDate',false)
-
model
-
end
-
-
1
def parse_xml_entry(entry)
-
return nil unless entry
-
model = self.new
-
self.parse_element_data(model, entry)
-
self.parse_resource_data(model, entry)
-
parse_primitive_field(model,entry,'type','fhirType',false)
-
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
set_model_data(model, 'ruleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:ruleset')))
-
set_model_data(model, 'originalRuleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:originalRuleset')))
-
parse_primitive_field(model,entry,'created','created',false)
-
set_model_data(model, 'target', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:target')))
-
set_model_data(model, 'provider', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:provider')))
-
set_model_data(model, 'organization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:organization')))
-
parse_primitive_field(model,entry,'use','use',false)
-
set_model_data(model, 'priority', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:priority')))
-
set_model_data(model, 'fundsReserve', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:fundsReserve')))
-
set_model_data(model, 'enterer', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:enterer')))
-
set_model_data(model, 'facility', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:facility')))
-
set_model_data(model, 'prescription', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:prescription')))
-
set_model_data(model, 'originalPrescription', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:originalPrescription')))
-
set_model_data(model, 'payee', parse_xml_entry_PayeeComponent(entry.at_xpath('./fhir:payee')))
-
set_model_data(model, 'referral', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:referral')))
-
set_model_data(model, 'diagnosis', entry.xpath('./fhir:diagnosis').map {|e| parse_xml_entry_DiagnosisComponent(e)})
-
set_model_data(model, 'condition', entry.xpath('./fhir:condition').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
set_model_data(model, 'coverage', entry.xpath('./fhir:coverage').map {|e| parse_xml_entry_CoverageComponent(e)})
-
set_model_data(model, 'exception', entry.xpath('./fhir:exception').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
parse_primitive_field(model,entry,'school','school',false)
-
parse_primitive_field(model,entry,'accident','accident',false)
-
set_model_data(model, 'accidentType', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:accidentType')))
-
set_model_data(model, 'interventionException', entry.xpath('./fhir:interventionException').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
set_model_data(model, 'item', entry.xpath('./fhir:item').map {|e| parse_xml_entry_ItemsComponent(e)})
-
set_model_data(model, 'additionalMaterials', entry.xpath('./fhir:additionalMaterials').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
set_model_data(model, 'missingTeeth', entry.xpath('./fhir:missingTeeth').map {|e| parse_xml_entry_MissingTeethComponent(e)})
-
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module ClaimResponse
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ItemAdjudicationComponent(entry)
-
32
return nil unless entry
-
32
model = FHIR::ClaimResponse::ItemAdjudicationComponent.new
-
32
self.parse_element_data(model, entry)
-
32
set_model_data(model, 'code', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
32
set_model_data(model, 'amount', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:amount')))
-
32
parse_primitive_field(model,entry,'value','value',false)
-
32
model
-
end
-
-
1
def parse_xml_entry_DetailAdjudicationComponent(entry)
-
return nil unless entry
-
model = FHIR::ClaimResponse::DetailAdjudicationComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'code', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
set_model_data(model, 'amount', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:amount')))
-
parse_primitive_field(model,entry,'value','value',false)
-
model
-
end
-
-
1
def parse_xml_entry_SubdetailAdjudicationComponent(entry)
-
return nil unless entry
-
model = FHIR::ClaimResponse::SubdetailAdjudicationComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'code', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
set_model_data(model, 'amount', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:amount')))
-
parse_primitive_field(model,entry,'value','value',false)
-
model
-
end
-
-
1
def parse_xml_entry_SubDetailComponent(entry)
-
return nil unless entry
-
model = FHIR::ClaimResponse::SubDetailComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'sequenceLinkId','sequenceLinkId',false)
-
set_model_data(model, 'adjudication', entry.xpath('./fhir:adjudication').map {|e| parse_xml_entry_SubdetailAdjudicationComponent(e)})
-
model
-
end
-
-
1
def parse_xml_entry_ItemDetailComponent(entry)
-
return nil unless entry
-
model = FHIR::ClaimResponse::ItemDetailComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'sequenceLinkId','sequenceLinkId',false)
-
set_model_data(model, 'adjudication', entry.xpath('./fhir:adjudication').map {|e| parse_xml_entry_DetailAdjudicationComponent(e)})
-
set_model_data(model, 'subDetail', entry.xpath('./fhir:subDetail').map {|e| parse_xml_entry_SubDetailComponent(e)})
-
model
-
end
-
-
1
def parse_xml_entry_ItemsComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::ClaimResponse::ItemsComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'sequenceLinkId','sequenceLinkId',false)
-
8
parse_primitive_field(model,entry,'noteNumber','noteNumber',true)
-
40
set_model_data(model, 'adjudication', entry.xpath('./fhir:adjudication').map {|e| parse_xml_entry_ItemAdjudicationComponent(e)})
-
8
set_model_data(model, 'detail', entry.xpath('./fhir:detail').map {|e| parse_xml_entry_ItemDetailComponent(e)})
-
8
model
-
end
-
-
1
def parse_xml_entry_AddedItemAdjudicationComponent(entry)
-
return nil unless entry
-
model = FHIR::ClaimResponse::AddedItemAdjudicationComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'code', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
set_model_data(model, 'amount', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:amount')))
-
parse_primitive_field(model,entry,'value','value',false)
-
model
-
end
-
-
1
def parse_xml_entry_AddedItemDetailAdjudicationComponent(entry)
-
return nil unless entry
-
model = FHIR::ClaimResponse::AddedItemDetailAdjudicationComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'code', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
set_model_data(model, 'amount', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:amount')))
-
parse_primitive_field(model,entry,'value','value',false)
-
model
-
end
-
-
1
def parse_xml_entry_AddedItemsDetailComponent(entry)
-
return nil unless entry
-
model = FHIR::ClaimResponse::AddedItemsDetailComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'service', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:service')))
-
set_model_data(model, 'fee', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:fee')))
-
set_model_data(model, 'adjudication', entry.xpath('./fhir:adjudication').map {|e| parse_xml_entry_AddedItemDetailAdjudicationComponent(e)})
-
model
-
end
-
-
1
def parse_xml_entry_AddedItemComponent(entry)
-
return nil unless entry
-
model = FHIR::ClaimResponse::AddedItemComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'sequenceLinkId','sequenceLinkId',true)
-
set_model_data(model, 'service', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:service')))
-
set_model_data(model, 'fee', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:fee')))
-
parse_primitive_field(model,entry,'noteNumberLinkId','noteNumberLinkId',true)
-
set_model_data(model, 'adjudication', entry.xpath('./fhir:adjudication').map {|e| parse_xml_entry_AddedItemAdjudicationComponent(e)})
-
set_model_data(model, 'detail', entry.xpath('./fhir:detail').map {|e| parse_xml_entry_AddedItemsDetailComponent(e)})
-
model
-
end
-
-
1
def parse_xml_entry_ErrorsComponent(entry)
-
return nil unless entry
-
model = FHIR::ClaimResponse::ErrorsComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'sequenceLinkId','sequenceLinkId',false)
-
parse_primitive_field(model,entry,'detailSequenceLinkId','detailSequenceLinkId',false)
-
parse_primitive_field(model,entry,'subdetailSequenceLinkId','subdetailSequenceLinkId',false)
-
set_model_data(model, 'code', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
model
-
end
-
-
1
def parse_xml_entry_NotesComponent(entry)
-
return nil unless entry
-
model = FHIR::ClaimResponse::NotesComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'number','number',false)
-
set_model_data(model, 'fhirType', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
parse_primitive_field(model,entry,'text','text',false)
-
model
-
end
-
-
1
def parse_xml_entry_CoverageComponent(entry)
-
return nil unless entry
-
model = FHIR::ClaimResponse::CoverageComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'sequence','sequence',false)
-
parse_primitive_field(model,entry,'focal','focal',false)
-
set_model_data(model, 'coverage', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:coverage')))
-
parse_primitive_field(model,entry,'businessArrangement','businessArrangement',false)
-
set_model_data(model, 'relationship', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:relationship')))
-
parse_primitive_field(model,entry,'preAuthRef','preAuthRef',true)
-
set_model_data(model, 'claimResponse', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:claimResponse')))
-
set_model_data(model, 'originalRuleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:originalRuleset')))
-
model
-
end
-
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
8
set_model_data(model, 'request', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:request')))
-
8
set_model_data(model, 'ruleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:ruleset')))
-
8
set_model_data(model, 'originalRuleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:originalRuleset')))
-
8
parse_primitive_field(model,entry,'created','created',false)
-
8
set_model_data(model, 'organization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:organization')))
-
8
set_model_data(model, 'requestProvider', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:requestProvider')))
-
8
set_model_data(model, 'requestOrganization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:requestOrganization')))
-
8
parse_primitive_field(model,entry,'outcome','outcome',false)
-
8
parse_primitive_field(model,entry,'disposition','disposition',false)
-
8
set_model_data(model, 'payeeType', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:payeeType')))
-
16
set_model_data(model, 'item', entry.xpath('./fhir:item').map {|e| parse_xml_entry_ItemsComponent(e)})
-
8
set_model_data(model, 'addItem', entry.xpath('./fhir:addItem').map {|e| parse_xml_entry_AddedItemComponent(e)})
-
8
set_model_data(model, 'error', entry.xpath('./fhir:error').map {|e| parse_xml_entry_ErrorsComponent(e)})
-
8
set_model_data(model, 'totalCost', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:totalCost')))
-
8
set_model_data(model, 'unallocDeductable', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:unallocDeductable')))
-
8
set_model_data(model, 'totalBenefit', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:totalBenefit')))
-
8
set_model_data(model, 'paymentAdjustment', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:paymentAdjustment')))
-
8
set_model_data(model, 'paymentAdjustmentReason', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:paymentAdjustmentReason')))
-
8
parse_primitive_field(model,entry,'paymentDate','paymentDate',false)
-
8
set_model_data(model, 'paymentAmount', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:paymentAmount')))
-
8
set_model_data(model, 'paymentRef', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:paymentRef')))
-
8
set_model_data(model, 'reserved', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:reserved')))
-
8
set_model_data(model, 'form', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:form')))
-
8
set_model_data(model, 'note', entry.xpath('./fhir:note').map {|e| parse_xml_entry_NotesComponent(e)})
-
8
set_model_data(model, 'coverage', entry.xpath('./fhir:coverage').map {|e| parse_xml_entry_CoverageComponent(e)})
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module ClinicalImpression
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ClinicalImpressionInvestigationsComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::ClinicalImpression::ClinicalImpressionInvestigationsComponent.new
-
8
self.parse_element_data(model, entry)
-
8
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
40
set_model_data(model, 'item', entry.xpath('./fhir:item').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
model
-
end
-
-
1
def parse_xml_entry_ClinicalImpressionFindingComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::ClinicalImpression::ClinicalImpressionFindingComponent.new
-
8
self.parse_element_data(model, entry)
-
8
set_model_data(model, 'item', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:item')))
-
8
parse_primitive_field(model,entry,'cause','cause',false)
-
8
model
-
end
-
-
1
def parse_xml_entry_ClinicalImpressionRuledOutComponent(entry)
-
return nil unless entry
-
model = FHIR::ClinicalImpression::ClinicalImpressionRuledOutComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'item', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:item')))
-
parse_primitive_field(model,entry,'reason','reason',false)
-
model
-
end
-
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
8
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
8
set_model_data(model, 'assessor', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:assessor')))
-
8
parse_primitive_field(model,entry,'status','status',false)
-
8
parse_primitive_field(model,entry,'date','date',false)
-
8
parse_primitive_field(model,entry,'description','description',false)
-
8
set_model_data(model, 'previous', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:previous')))
-
16
set_model_data(model, 'problem', entry.xpath('./fhir:problem').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
set_model_data(model, 'triggerCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:triggerCodeableConcept')))
-
8
set_model_data(model, 'triggerReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:triggerReference')))
-
16
set_model_data(model, 'investigations', entry.xpath('./fhir:investigations').map {|e| parse_xml_entry_ClinicalImpressionInvestigationsComponent(e)})
-
8
parse_primitive_field(model,entry,'protocol','protocol',false)
-
8
parse_primitive_field(model,entry,'summary','summary',false)
-
16
set_model_data(model, 'finding', entry.xpath('./fhir:finding').map {|e| parse_xml_entry_ClinicalImpressionFindingComponent(e)})
-
8
set_model_data(model, 'resolved', entry.xpath('./fhir:resolved').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
8
set_model_data(model, 'ruledOut', entry.xpath('./fhir:ruledOut').map {|e| parse_xml_entry_ClinicalImpressionRuledOutComponent(e)})
-
8
parse_primitive_field(model,entry,'prognosis','prognosis',false)
-
16
set_model_data(model, 'plan', entry.xpath('./fhir:plan').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
set_model_data(model, 'action', entry.xpath('./fhir:action').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module CodeableConcept
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
59101
return nil unless entry
-
19402
model = self.new
-
19402
self.parse_element_data(model, entry)
-
36708
set_model_data(model, 'coding', entry.xpath('./fhir:coding').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
19402
parse_primitive_field(model,entry,'text','text',false)
-
19402
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Coding
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
22012
return nil unless entry
-
20416
model = self.new
-
20416
self.parse_element_data(model, entry)
-
20416
parse_primitive_field(model,entry,'system','system',false)
-
20416
parse_primitive_field(model,entry,'version','versionNum',false)
-
20416
parse_primitive_field(model,entry,'code','code',false)
-
20416
parse_primitive_field(model,entry,'display','display',false)
-
20416
parse_primitive_field(model,entry,'userSelected','userSelected',false)
-
20416
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Communication
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_CommunicationPayloadComponent(entry)
-
32
return nil unless entry
-
32
model = FHIR::Communication::CommunicationPayloadComponent.new
-
32
self.parse_element_data(model, entry)
-
32
parse_primitive_field(model,entry,'contentString','contentString',false)
-
32
set_model_data(model, 'contentAttachment', FHIR::Attachment.parse_xml_entry(entry.at_xpath('./fhir:contentAttachment')))
-
32
set_model_data(model, 'contentReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:contentReference')))
-
32
model
-
end
-
-
1
def parse_xml_entry(entry)
-
16
return nil unless entry
-
16
model = self.new
-
16
self.parse_element_data(model, entry)
-
16
self.parse_resource_data(model, entry)
-
32
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
16
set_model_data(model, 'category', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:category')))
-
16
set_model_data(model, 'sender', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:sender')))
-
32
set_model_data(model, 'recipient', entry.xpath('./fhir:recipient').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
48
set_model_data(model, 'payload', entry.xpath('./fhir:payload').map {|e| parse_xml_entry_CommunicationPayloadComponent(e)})
-
16
set_model_data(model, 'medium', entry.xpath('./fhir:medium').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
16
parse_primitive_field(model,entry,'status','status',false)
-
16
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
16
parse_primitive_field(model,entry,'sent','sent',false)
-
16
parse_primitive_field(model,entry,'received','received',false)
-
16
set_model_data(model, 'reason', entry.xpath('./fhir:reason').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
16
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
16
set_model_data(model, 'requestDetail', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:requestDetail')))
-
16
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module CommunicationRequest
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_CommunicationRequestPayloadComponent(entry)
-
return nil unless entry
-
model = FHIR::CommunicationRequest::CommunicationRequestPayloadComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'contentString','contentString',false)
-
set_model_data(model, 'contentAttachment', FHIR::Attachment.parse_xml_entry(entry.at_xpath('./fhir:contentAttachment')))
-
set_model_data(model, 'contentReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:contentReference')))
-
model
-
end
-
-
1
def parse_xml_entry(entry)
-
16
return nil unless entry
-
16
model = self.new
-
16
self.parse_element_data(model, entry)
-
16
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
16
set_model_data(model, 'category', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:category')))
-
16
set_model_data(model, 'sender', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:sender')))
-
16
set_model_data(model, 'recipient', entry.xpath('./fhir:recipient').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
16
set_model_data(model, 'payload', entry.xpath('./fhir:payload').map {|e| parse_xml_entry_CommunicationRequestPayloadComponent(e)})
-
16
set_model_data(model, 'medium', entry.xpath('./fhir:medium').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
16
set_model_data(model, 'requester', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:requester')))
-
16
parse_primitive_field(model,entry,'status','status',false)
-
16
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
16
parse_primitive_field(model,entry,'scheduledDateTime','scheduledDateTime',false)
-
16
set_model_data(model, 'scheduledPeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:scheduledPeriod')))
-
16
set_model_data(model, 'reason', entry.xpath('./fhir:reason').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
16
parse_primitive_field(model,entry,'requestedOn','requestedOn',false)
-
16
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
16
set_model_data(model, 'priority', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:priority')))
-
16
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Composition
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_CompositionAttesterComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::Composition::CompositionAttesterComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'mode','mode',true)
-
8
parse_primitive_field(model,entry,'time','time',false)
-
8
set_model_data(model, 'party', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:party')))
-
8
model
-
end
-
-
1
def parse_xml_entry_CompositionEventComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::Composition::CompositionEventComponent.new
-
8
self.parse_element_data(model, entry)
-
16
set_model_data(model, 'code', entry.xpath('./fhir:code').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
8
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
16
set_model_data(model, 'detail', entry.xpath('./fhir:detail').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
model
-
end
-
-
1
def parse_xml_entry_SectionComponent(entry)
-
40
return nil unless entry
-
40
model = FHIR::Composition::SectionComponent.new
-
40
self.parse_element_data(model, entry)
-
40
parse_primitive_field(model,entry,'title','title',false)
-
40
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
40
set_model_data(model, 'text', FHIR::Narrative.parse_xml_entry(entry.at_xpath('./fhir:text')))
-
40
parse_primitive_field(model,entry,'mode','mode',false)
-
40
set_model_data(model, 'orderedBy', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:orderedBy')))
-
96
set_model_data(model, 'entry', entry.xpath('./fhir:entry').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
40
set_model_data(model, 'emptyReason', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:emptyReason')))
-
40
set_model_data(model, 'section', entry.xpath('./fhir:section').map {|e| parse_xml_entry_SectionComponent(e)})
-
40
model
-
end
-
-
1
def parse_xml_entry(entry)
-
16
return nil unless entry
-
16
model = self.new
-
16
self.parse_element_data(model, entry)
-
16
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
16
parse_primitive_field(model,entry,'date','date',false)
-
16
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
16
set_model_data(model, 'fhirClass', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:class')))
-
16
parse_primitive_field(model,entry,'title','title',false)
-
16
parse_primitive_field(model,entry,'status','status',false)
-
16
parse_primitive_field(model,entry,'confidentiality','confidentiality',false)
-
16
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
32
set_model_data(model, 'author', entry.xpath('./fhir:author').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
24
set_model_data(model, 'attester', entry.xpath('./fhir:attester').map {|e| parse_xml_entry_CompositionAttesterComponent(e)})
-
16
set_model_data(model, 'custodian', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:custodian')))
-
24
set_model_data(model, 'event', entry.xpath('./fhir:event').map {|e| parse_xml_entry_CompositionEventComponent(e)})
-
16
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
56
set_model_data(model, 'section', entry.xpath('./fhir:section').map {|e| parse_xml_entry_SectionComponent(e)})
-
16
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module ConceptMap
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ConceptMapContactComponent(entry)
-
24
return nil unless entry
-
24
model = FHIR::ConceptMap::ConceptMapContactComponent.new
-
24
self.parse_element_data(model, entry)
-
24
parse_primitive_field(model,entry,'name','name',false)
-
48
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
24
model
-
end
-
-
1
def parse_xml_entry_OtherElementComponent(entry)
-
992
return nil unless entry
-
992
model = FHIR::ConceptMap::OtherElementComponent.new
-
992
self.parse_element_data(model, entry)
-
992
parse_primitive_field(model,entry,'element','element',false)
-
992
parse_primitive_field(model,entry,'codeSystem','codeSystem',false)
-
992
parse_primitive_field(model,entry,'code','code',false)
-
992
model
-
end
-
-
1
def parse_xml_entry_TargetElementComponent(entry)
-
2300
return nil unless entry
-
2300
model = FHIR::ConceptMap::TargetElementComponent.new
-
2300
self.parse_element_data(model, entry)
-
2300
parse_primitive_field(model,entry,'codeSystem','codeSystem',false)
-
2300
parse_primitive_field(model,entry,'code','code',false)
-
2300
parse_primitive_field(model,entry,'equivalence','equivalence',false)
-
2300
parse_primitive_field(model,entry,'comments','comments',false)
-
2300
set_model_data(model, 'dependsOn', entry.xpath('./fhir:dependsOn').map {|e| parse_xml_entry_OtherElementComponent(e)})
-
3292
set_model_data(model, 'product', entry.xpath('./fhir:product').map {|e| parse_xml_entry_OtherElementComponent(e)})
-
2300
model
-
end
-
-
1
def parse_xml_entry_SourceElementComponent(entry)
-
2300
return nil unless entry
-
2300
model = FHIR::ConceptMap::SourceElementComponent.new
-
2300
self.parse_element_data(model, entry)
-
2300
parse_primitive_field(model,entry,'codeSystem','codeSystem',false)
-
2300
parse_primitive_field(model,entry,'code','code',false)
-
4600
set_model_data(model, 'target', entry.xpath('./fhir:target').map {|e| parse_xml_entry_TargetElementComponent(e)})
-
2300
model
-
end
-
-
1
def parse_xml_entry(entry)
-
33
return nil unless entry
-
33
model = self.new
-
33
self.parse_element_data(model, entry)
-
33
self.parse_resource_data(model, entry)
-
33
parse_primitive_field(model,entry,'url','url',false)
-
33
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
33
parse_primitive_field(model,entry,'version','versionNum',false)
-
33
parse_primitive_field(model,entry,'name','name',false)
-
33
parse_primitive_field(model,entry,'status','status',false)
-
33
parse_primitive_field(model,entry,'experimental','experimental',false)
-
33
parse_primitive_field(model,entry,'publisher','publisher',false)
-
57
set_model_data(model, 'contact', entry.xpath('./fhir:contact').map {|e| parse_xml_entry_ConceptMapContactComponent(e)})
-
33
parse_primitive_field(model,entry,'date','date',false)
-
33
parse_primitive_field(model,entry,'description','description',false)
-
41
set_model_data(model, 'useContext', entry.xpath('./fhir:useContext').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
33
parse_primitive_field(model,entry,'requirements','requirements',false)
-
33
parse_primitive_field(model,entry,'copyright','copyright',false)
-
33
parse_primitive_field(model,entry,'sourceUri','sourceUri',false)
-
33
set_model_data(model, 'sourceReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:sourceReference')))
-
33
parse_primitive_field(model,entry,'targetUri','targetUri',false)
-
33
set_model_data(model, 'targetReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:targetReference')))
-
2333
set_model_data(model, 'element', entry.xpath('./fhir:element').map {|e| parse_xml_entry_SourceElementComponent(e)})
-
33
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Condition
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ConditionStageComponent(entry)
-
168
return nil unless entry
-
16
model = FHIR::Condition::ConditionStageComponent.new
-
16
self.parse_element_data(model, entry)
-
16
set_model_data(model, 'summary', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:summary')))
-
16
set_model_data(model, 'assessment', entry.xpath('./fhir:assessment').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
16
model
-
end
-
-
1
def parse_xml_entry_ConditionEvidenceComponent(entry)
-
48
return nil unless entry
-
48
model = FHIR::Condition::ConditionEvidenceComponent.new
-
48
self.parse_element_data(model, entry)
-
48
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
72
set_model_data(model, 'detail', entry.xpath('./fhir:detail').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
48
model
-
end
-
-
1
def parse_xml_entry(entry)
-
168
return nil unless entry
-
168
model = self.new
-
168
self.parse_element_data(model, entry)
-
168
self.parse_resource_data(model, entry)
-
168
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
168
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
168
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
168
set_model_data(model, 'asserter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:asserter')))
-
168
parse_primitive_field(model,entry,'dateRecorded','dateRecorded',false)
-
168
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
168
set_model_data(model, 'category', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:category')))
-
168
parse_primitive_field(model,entry,'clinicalStatus','clinicalStatus',false)
-
168
parse_primitive_field(model,entry,'verificationStatus','verificationStatus',false)
-
168
set_model_data(model, 'severity', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:severity')))
-
168
parse_primitive_field(model,entry,'onsetDateTime','onsetDateTime',false)
-
168
set_model_data(model, 'onsetQuantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:onsetQuantity')))
-
168
set_model_data(model, 'onsetPeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:onsetPeriod')))
-
168
set_model_data(model, 'onsetRange', FHIR::Range.parse_xml_entry(entry.at_xpath('./fhir:onsetRange')))
-
168
parse_primitive_field(model,entry,'onsetString','onsetString',false)
-
168
parse_primitive_field(model,entry,'abatementDateTime','abatementDateTime',false)
-
168
set_model_data(model, 'abatementQuantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:abatementQuantity')))
-
168
parse_primitive_field(model,entry,'abatementBoolean','abatementBoolean',false)
-
168
set_model_data(model, 'abatementPeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:abatementPeriod')))
-
168
set_model_data(model, 'abatementRange', FHIR::Range.parse_xml_entry(entry.at_xpath('./fhir:abatementRange')))
-
168
parse_primitive_field(model,entry,'abatementString','abatementString',false)
-
168
set_model_data(model, 'stage', parse_xml_entry_ConditionStageComponent(entry.at_xpath('./fhir:stage')))
-
216
set_model_data(model, 'evidence', entry.xpath('./fhir:evidence').map {|e| parse_xml_entry_ConditionEvidenceComponent(e)})
-
240
set_model_data(model, 'bodySite', entry.xpath('./fhir:bodySite').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
168
parse_primitive_field(model,entry,'notes','notes',false)
-
168
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Conformance
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ConformanceContactComponent(entry)
-
18
return nil unless entry
-
18
model = FHIR::Conformance::ConformanceContactComponent.new
-
18
self.parse_element_data(model, entry)
-
18
parse_primitive_field(model,entry,'name','name',false)
-
36
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
18
model
-
end
-
-
1
def parse_xml_entry_ConformanceSoftwareComponent(entry)
-
18
return nil unless entry
-
18
model = FHIR::Conformance::ConformanceSoftwareComponent.new
-
18
self.parse_element_data(model, entry)
-
18
parse_primitive_field(model,entry,'name','name',false)
-
18
parse_primitive_field(model,entry,'version','versionNum',false)
-
18
parse_primitive_field(model,entry,'releaseDate','releaseDate',false)
-
18
model
-
end
-
-
1
def parse_xml_entry_ConformanceImplementationComponent(entry)
-
18
return nil unless entry
-
8
model = FHIR::Conformance::ConformanceImplementationComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'description','description',false)
-
8
parse_primitive_field(model,entry,'url','url',false)
-
8
model
-
end
-
-
1
def parse_xml_entry_ConformanceRestSecurityCertificateComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::Conformance::ConformanceRestSecurityCertificateComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'type','fhirType',false)
-
8
parse_primitive_field(model,entry,'blob','blob',false)
-
8
model
-
end
-
-
1
def parse_xml_entry_ConformanceRestSecurityComponent(entry)
-
18
return nil unless entry
-
18
model = FHIR::Conformance::ConformanceRestSecurityComponent.new
-
18
self.parse_element_data(model, entry)
-
18
parse_primitive_field(model,entry,'cors','cors',false)
-
36
set_model_data(model, 'service', entry.xpath('./fhir:service').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
18
parse_primitive_field(model,entry,'description','description',false)
-
26
set_model_data(model, 'certificate', entry.xpath('./fhir:certificate').map {|e| parse_xml_entry_ConformanceRestSecurityCertificateComponent(e)})
-
18
model
-
end
-
-
1
def parse_xml_entry_ResourceInteractionComponent(entry)
-
950
return nil unless entry
-
950
model = FHIR::Conformance::ResourceInteractionComponent.new
-
950
self.parse_element_data(model, entry)
-
950
parse_primitive_field(model,entry,'code','code',false)
-
950
parse_primitive_field(model,entry,'documentation','documentation',false)
-
950
model
-
end
-
-
1
def parse_xml_entry_ConformanceRestResourceSearchParamComponent(entry)
-
919
return nil unless entry
-
919
model = FHIR::Conformance::ConformanceRestResourceSearchParamComponent.new
-
919
self.parse_element_data(model, entry)
-
919
parse_primitive_field(model,entry,'name','name',false)
-
919
parse_primitive_field(model,entry,'definition','definition',false)
-
919
parse_primitive_field(model,entry,'type','fhirType',false)
-
919
parse_primitive_field(model,entry,'documentation','documentation',false)
-
919
parse_primitive_field(model,entry,'target','target',true)
-
919
parse_primitive_field(model,entry,'modifier','fhirModifier',true)
-
919
parse_primitive_field(model,entry,'chain','chain',true)
-
919
model
-
end
-
-
1
def parse_xml_entry_ConformanceRestResourceComponent(entry)
-
134
return nil unless entry
-
134
model = FHIR::Conformance::ConformanceRestResourceComponent.new
-
134
self.parse_element_data(model, entry)
-
134
parse_primitive_field(model,entry,'type','fhirType',false)
-
134
set_model_data(model, 'profile', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:profile')))
-
1084
set_model_data(model, 'interaction', entry.xpath('./fhir:interaction').map {|e| parse_xml_entry_ResourceInteractionComponent(e)})
-
134
parse_primitive_field(model,entry,'versioning','versioning',false)
-
134
parse_primitive_field(model,entry,'readHistory','readHistory',false)
-
134
parse_primitive_field(model,entry,'updateCreate','updateCreate',false)
-
134
parse_primitive_field(model,entry,'conditionalCreate','conditionalCreate',false)
-
134
parse_primitive_field(model,entry,'conditionalUpdate','conditionalUpdate',false)
-
134
parse_primitive_field(model,entry,'conditionalDelete','conditionalDelete',false)
-
134
parse_primitive_field(model,entry,'searchInclude','searchInclude',true)
-
134
parse_primitive_field(model,entry,'searchRevInclude','searchRevInclude',true)
-
1045
set_model_data(model, 'searchParam', entry.xpath('./fhir:searchParam').map {|e| parse_xml_entry_ConformanceRestResourceSearchParamComponent(e)})
-
134
model
-
end
-
-
1
def parse_xml_entry_SystemInteractionComponent(entry)
-
19
return nil unless entry
-
19
model = FHIR::Conformance::SystemInteractionComponent.new
-
19
self.parse_element_data(model, entry)
-
19
parse_primitive_field(model,entry,'code','code',false)
-
19
parse_primitive_field(model,entry,'documentation','documentation',false)
-
19
model
-
end
-
-
1
def parse_xml_entry_ConformanceRestOperationComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::Conformance::ConformanceRestOperationComponent.new
-
16
self.parse_element_data(model, entry)
-
16
parse_primitive_field(model,entry,'name','name',false)
-
16
set_model_data(model, 'definition', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:definition')))
-
16
model
-
end
-
-
1
def parse_xml_entry_ConformanceRestComponent(entry)
-
18
return nil unless entry
-
18
model = FHIR::Conformance::ConformanceRestComponent.new
-
18
self.parse_element_data(model, entry)
-
18
parse_primitive_field(model,entry,'mode','mode',false)
-
18
parse_primitive_field(model,entry,'documentation','documentation',false)
-
18
set_model_data(model, 'security', parse_xml_entry_ConformanceRestSecurityComponent(entry.at_xpath('./fhir:security')))
-
152
set_model_data(model, 'resource', entry.xpath('./fhir:resource').map {|e| parse_xml_entry_ConformanceRestResourceComponent(e)})
-
37
set_model_data(model, 'interaction', entry.xpath('./fhir:interaction').map {|e| parse_xml_entry_SystemInteractionComponent(e)})
-
18
parse_primitive_field(model,entry,'transactionMode','transactionMode',false)
-
26
set_model_data(model, 'searchParam', entry.xpath('./fhir:searchParam').map {|e| parse_xml_entry_ConformanceRestResourceSearchParamComponent(e)})
-
34
set_model_data(model, 'operation', entry.xpath('./fhir:operation').map {|e| parse_xml_entry_ConformanceRestOperationComponent(e)})
-
18
parse_primitive_field(model,entry,'compartment','compartment',true)
-
18
model
-
end
-
-
1
def parse_xml_entry_ConformanceMessagingEndpointComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::Conformance::ConformanceMessagingEndpointComponent.new
-
8
self.parse_element_data(model, entry)
-
8
set_model_data(model, 'protocol', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:protocol')))
-
8
parse_primitive_field(model,entry,'address','address',false)
-
8
model
-
end
-
-
1
def parse_xml_entry_ConformanceMessagingEventComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::Conformance::ConformanceMessagingEventComponent.new
-
8
self.parse_element_data(model, entry)
-
8
set_model_data(model, 'code', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
8
parse_primitive_field(model,entry,'category','category',false)
-
8
parse_primitive_field(model,entry,'mode','mode',false)
-
8
parse_primitive_field(model,entry,'focus','focus',false)
-
8
set_model_data(model, 'request', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:request')))
-
8
set_model_data(model, 'response', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:response')))
-
8
parse_primitive_field(model,entry,'documentation','documentation',false)
-
8
model
-
end
-
-
1
def parse_xml_entry_ConformanceMessagingComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::Conformance::ConformanceMessagingComponent.new
-
8
self.parse_element_data(model, entry)
-
16
set_model_data(model, 'endpoint', entry.xpath('./fhir:endpoint').map {|e| parse_xml_entry_ConformanceMessagingEndpointComponent(e)})
-
8
parse_primitive_field(model,entry,'reliableCache','reliableCache',false)
-
8
parse_primitive_field(model,entry,'documentation','documentation',false)
-
16
set_model_data(model, 'event', entry.xpath('./fhir:event').map {|e| parse_xml_entry_ConformanceMessagingEventComponent(e)})
-
8
model
-
end
-
-
1
def parse_xml_entry_ConformanceDocumentComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::Conformance::ConformanceDocumentComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'mode','mode',false)
-
8
parse_primitive_field(model,entry,'documentation','documentation',false)
-
8
set_model_data(model, 'profile', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:profile')))
-
8
model
-
end
-
-
1
def parse_xml_entry(entry)
-
18
return nil unless entry
-
18
model = self.new
-
18
self.parse_element_data(model, entry)
-
18
self.parse_resource_data(model, entry)
-
18
parse_primitive_field(model,entry,'url','url',false)
-
18
parse_primitive_field(model,entry,'version','versionNum',false)
-
18
parse_primitive_field(model,entry,'name','name',false)
-
18
parse_primitive_field(model,entry,'status','status',false)
-
18
parse_primitive_field(model,entry,'experimental','experimental',false)
-
18
parse_primitive_field(model,entry,'publisher','publisher',false)
-
36
set_model_data(model, 'contact', entry.xpath('./fhir:contact').map {|e| parse_xml_entry_ConformanceContactComponent(e)})
-
18
parse_primitive_field(model,entry,'date','date',false)
-
18
parse_primitive_field(model,entry,'description','description',false)
-
18
parse_primitive_field(model,entry,'requirements','requirements',false)
-
18
parse_primitive_field(model,entry,'copyright','copyright',false)
-
18
parse_primitive_field(model,entry,'kind','kind',false)
-
18
set_model_data(model, 'software', parse_xml_entry_ConformanceSoftwareComponent(entry.at_xpath('./fhir:software')))
-
18
set_model_data(model, 'implementation', parse_xml_entry_ConformanceImplementationComponent(entry.at_xpath('./fhir:implementation')))
-
18
parse_primitive_field(model,entry,'fhirVersion','fhirVersion',false)
-
18
parse_primitive_field(model,entry,'acceptUnknown','acceptUnknown',false)
-
18
parse_primitive_field(model,entry,'format','format',true)
-
18
set_model_data(model, 'profile', entry.xpath('./fhir:profile').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
36
set_model_data(model, 'rest', entry.xpath('./fhir:rest').map {|e| parse_xml_entry_ConformanceRestComponent(e)})
-
26
set_model_data(model, 'messaging', entry.xpath('./fhir:messaging').map {|e| parse_xml_entry_ConformanceMessagingComponent(e)})
-
26
set_model_data(model, 'document', entry.xpath('./fhir:document').map {|e| parse_xml_entry_ConformanceDocumentComponent(e)})
-
18
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module ContactPoint
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
3188
return nil unless entry
-
3188
model = self.new
-
3188
self.parse_element_data(model, entry)
-
3188
parse_primitive_field(model,entry,'system','system',false)
-
3188
parse_primitive_field(model,entry,'value','value',false)
-
3188
parse_primitive_field(model,entry,'use','use',false)
-
3188
parse_primitive_field(model,entry,'rank','rank',false)
-
3188
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
3188
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Contract
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ActorComponent(entry)
-
return nil unless entry
-
model = FHIR::Contract::ActorComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'entity', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:entity')))
-
set_model_data(model, 'role', entry.xpath('./fhir:role').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
model
-
end
-
-
1
def parse_xml_entry_ValuedItemComponent(entry)
-
return nil unless entry
-
model = FHIR::Contract::ValuedItemComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'entityCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:entityCodeableConcept')))
-
set_model_data(model, 'entityReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:entityReference')))
-
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
parse_primitive_field(model,entry,'effectiveTime','effectiveTime',false)
-
set_model_data(model, 'quantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:quantity')))
-
set_model_data(model, 'unitPrice', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:unitPrice')))
-
parse_primitive_field(model,entry,'factor','factor',false)
-
parse_primitive_field(model,entry,'points','points',false)
-
set_model_data(model, 'net', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:net')))
-
model
-
end
-
-
1
def parse_xml_entry_SignatoryComponent(entry)
-
return nil unless entry
-
model = FHIR::Contract::SignatoryComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'fhirType', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
set_model_data(model, 'party', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:party')))
-
parse_primitive_field(model,entry,'signature','signature',false)
-
model
-
end
-
-
1
def parse_xml_entry_TermActorComponent(entry)
-
return nil unless entry
-
model = FHIR::Contract::TermActorComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'entity', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:entity')))
-
set_model_data(model, 'role', entry.xpath('./fhir:role').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
model
-
end
-
-
1
def parse_xml_entry_TermValuedItemComponent(entry)
-
return nil unless entry
-
model = FHIR::Contract::TermValuedItemComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'entityCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:entityCodeableConcept')))
-
set_model_data(model, 'entityReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:entityReference')))
-
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
parse_primitive_field(model,entry,'effectiveTime','effectiveTime',false)
-
set_model_data(model, 'quantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:quantity')))
-
set_model_data(model, 'unitPrice', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:unitPrice')))
-
parse_primitive_field(model,entry,'factor','factor',false)
-
parse_primitive_field(model,entry,'points','points',false)
-
set_model_data(model, 'net', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:net')))
-
model
-
end
-
-
1
def parse_xml_entry_TermComponent(entry)
-
return nil unless entry
-
model = FHIR::Contract::TermComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
parse_primitive_field(model,entry,'issued','issued',false)
-
set_model_data(model, 'applies', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:applies')))
-
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
set_model_data(model, 'subType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:subType')))
-
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
set_model_data(model, 'action', entry.xpath('./fhir:action').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
set_model_data(model, 'actionReason', entry.xpath('./fhir:actionReason').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
set_model_data(model, 'actor', entry.xpath('./fhir:actor').map {|e| parse_xml_entry_TermActorComponent(e)})
-
parse_primitive_field(model,entry,'text','text',false)
-
set_model_data(model, 'valuedItem', entry.xpath('./fhir:valuedItem').map {|e| parse_xml_entry_TermValuedItemComponent(e)})
-
set_model_data(model, 'group', entry.xpath('./fhir:group').map {|e| parse_xml_entry_TermComponent(e)})
-
model
-
end
-
-
1
def parse_xml_entry_FriendlyLanguageComponent(entry)
-
return nil unless entry
-
model = FHIR::Contract::FriendlyLanguageComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'contentAttachment', FHIR::Attachment.parse_xml_entry(entry.at_xpath('./fhir:contentAttachment')))
-
set_model_data(model, 'contentReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:contentReference')))
-
model
-
end
-
-
1
def parse_xml_entry_LegalLanguageComponent(entry)
-
return nil unless entry
-
model = FHIR::Contract::LegalLanguageComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'contentAttachment', FHIR::Attachment.parse_xml_entry(entry.at_xpath('./fhir:contentAttachment')))
-
set_model_data(model, 'contentReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:contentReference')))
-
model
-
end
-
-
1
def parse_xml_entry_ComputableLanguageComponent(entry)
-
return nil unless entry
-
model = FHIR::Contract::ComputableLanguageComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'contentAttachment', FHIR::Attachment.parse_xml_entry(entry.at_xpath('./fhir:contentAttachment')))
-
set_model_data(model, 'contentReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:contentReference')))
-
model
-
end
-
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
8
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
8
parse_primitive_field(model,entry,'issued','issued',false)
-
8
set_model_data(model, 'applies', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:applies')))
-
8
set_model_data(model, 'subject', entry.xpath('./fhir:subject').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
set_model_data(model, 'authority', entry.xpath('./fhir:authority').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
set_model_data(model, 'domain', entry.xpath('./fhir:domain').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
8
set_model_data(model, 'subType', entry.xpath('./fhir:subType').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
8
set_model_data(model, 'action', entry.xpath('./fhir:action').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
8
set_model_data(model, 'actionReason', entry.xpath('./fhir:actionReason').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
8
set_model_data(model, 'actor', entry.xpath('./fhir:actor').map {|e| parse_xml_entry_ActorComponent(e)})
-
8
set_model_data(model, 'valuedItem', entry.xpath('./fhir:valuedItem').map {|e| parse_xml_entry_ValuedItemComponent(e)})
-
8
set_model_data(model, 'signer', entry.xpath('./fhir:signer').map {|e| parse_xml_entry_SignatoryComponent(e)})
-
8
set_model_data(model, 'term', entry.xpath('./fhir:term').map {|e| parse_xml_entry_TermComponent(e)})
-
8
set_model_data(model, 'bindingAttachment', FHIR::Attachment.parse_xml_entry(entry.at_xpath('./fhir:bindingAttachment')))
-
8
set_model_data(model, 'bindingReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:bindingReference')))
-
8
set_model_data(model, 'friendly', entry.xpath('./fhir:friendly').map {|e| parse_xml_entry_FriendlyLanguageComponent(e)})
-
8
set_model_data(model, 'legal', entry.xpath('./fhir:legal').map {|e| parse_xml_entry_LegalLanguageComponent(e)})
-
8
set_model_data(model, 'rule', entry.xpath('./fhir:rule').map {|e| parse_xml_entry_ComputableLanguageComponent(e)})
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Coverage
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
return nil unless entry
-
model = self.new
-
self.parse_element_data(model, entry)
-
self.parse_resource_data(model, entry)
-
set_model_data(model, 'issuer', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:issuer')))
-
set_model_data(model, 'bin', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:bin')))
-
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
set_model_data(model, 'fhirType', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
set_model_data(model, 'subscriberId', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:subscriberId')))
-
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
parse_primitive_field(model,entry,'group','group',false)
-
parse_primitive_field(model,entry,'plan','plan',false)
-
parse_primitive_field(model,entry,'subPlan','subPlan',false)
-
parse_primitive_field(model,entry,'dependent','dependent',false)
-
parse_primitive_field(model,entry,'sequence','sequence',false)
-
set_model_data(model, 'subscriber', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subscriber')))
-
set_model_data(model, 'network', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:network')))
-
set_model_data(model, 'contract', entry.xpath('./fhir:contract').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module DataElement
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_DataElementContactComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::DataElement::DataElementContactComponent.new
-
16
self.parse_element_data(model, entry)
-
16
parse_primitive_field(model,entry,'name','name',false)
-
32
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
16
model
-
end
-
-
1
def parse_xml_entry_DataElementMappingComponent(entry)
-
216
return nil unless entry
-
216
model = FHIR::DataElement::DataElementMappingComponent.new
-
216
self.parse_element_data(model, entry)
-
216
parse_primitive_field(model,entry,'identity','fhirIdentity',false)
-
216
parse_primitive_field(model,entry,'uri','uri',false)
-
216
parse_primitive_field(model,entry,'name','name',false)
-
216
parse_primitive_field(model,entry,'comments','comments',false)
-
216
model
-
end
-
-
1
def parse_xml_entry(entry)
-
224
return nil unless entry
-
224
model = self.new
-
224
self.parse_element_data(model, entry)
-
224
self.parse_resource_data(model, entry)
-
224
parse_primitive_field(model,entry,'url','url',false)
-
448
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
224
parse_primitive_field(model,entry,'version','versionNum',false)
-
224
parse_primitive_field(model,entry,'name','name',false)
-
224
parse_primitive_field(model,entry,'status','status',false)
-
224
parse_primitive_field(model,entry,'experimental','experimental',false)
-
224
parse_primitive_field(model,entry,'publisher','publisher',false)
-
240
set_model_data(model, 'contact', entry.xpath('./fhir:contact').map {|e| parse_xml_entry_DataElementContactComponent(e)})
-
224
parse_primitive_field(model,entry,'date','date',false)
-
624
set_model_data(model, 'useContext', entry.xpath('./fhir:useContext').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
224
parse_primitive_field(model,entry,'copyright','copyright',false)
-
224
parse_primitive_field(model,entry,'stringency','stringency',false)
-
440
set_model_data(model, 'mapping', entry.xpath('./fhir:mapping').map {|e| parse_xml_entry_DataElementMappingComponent(e)})
-
448
set_model_data(model, 'element', entry.xpath('./fhir:element').map {|e| FHIR::ElementDefinition.parse_xml_entry(e)})
-
224
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module DetectedIssue
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_DetectedIssueMitigationComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::DetectedIssue::DetectedIssueMitigationComponent.new
-
8
self.parse_element_data(model, entry)
-
8
set_model_data(model, 'action', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:action')))
-
8
parse_primitive_field(model,entry,'date','date',false)
-
8
set_model_data(model, 'author', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:author')))
-
8
model
-
end
-
-
1
def parse_xml_entry(entry)
-
32
return nil unless entry
-
32
model = self.new
-
32
self.parse_element_data(model, entry)
-
32
self.parse_resource_data(model, entry)
-
32
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
32
set_model_data(model, 'category', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:category')))
-
32
parse_primitive_field(model,entry,'severity','severity',false)
-
64
set_model_data(model, 'implicated', entry.xpath('./fhir:implicated').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
32
parse_primitive_field(model,entry,'detail','detail',false)
-
32
parse_primitive_field(model,entry,'date','date',false)
-
32
set_model_data(model, 'author', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:author')))
-
32
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
32
parse_primitive_field(model,entry,'reference','reference',false)
-
40
set_model_data(model, 'mitigation', entry.xpath('./fhir:mitigation').map {|e| parse_xml_entry_DetectedIssueMitigationComponent(e)})
-
32
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Device
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
56
return nil unless entry
-
56
model = self.new
-
56
self.parse_element_data(model, entry)
-
56
self.parse_resource_data(model, entry)
-
136
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
56
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
64
set_model_data(model, 'note', entry.xpath('./fhir:note').map {|e| FHIR::Annotation.parse_xml_entry(e)})
-
56
parse_primitive_field(model,entry,'status','status',false)
-
56
parse_primitive_field(model,entry,'manufacturer','manufacturer',false)
-
56
parse_primitive_field(model,entry,'model','model',false)
-
56
parse_primitive_field(model,entry,'version','versionNum',false)
-
56
parse_primitive_field(model,entry,'manufactureDate','manufactureDate',false)
-
56
parse_primitive_field(model,entry,'expiry','expiry',false)
-
56
parse_primitive_field(model,entry,'udi','udi',false)
-
56
parse_primitive_field(model,entry,'lotNumber','lotNumber',false)
-
56
set_model_data(model, 'owner', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:owner')))
-
56
set_model_data(model, 'location', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:location')))
-
56
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
80
set_model_data(model, 'contact', entry.xpath('./fhir:contact').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
56
parse_primitive_field(model,entry,'url','url',false)
-
56
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module DeviceComponent
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_DeviceComponentProductionSpecificationComponent(entry)
-
32
return nil unless entry
-
32
model = FHIR::DeviceComponent::DeviceComponentProductionSpecificationComponent.new
-
32
self.parse_element_data(model, entry)
-
32
set_model_data(model, 'specType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:specType')))
-
32
set_model_data(model, 'componentId', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:componentId')))
-
32
parse_primitive_field(model,entry,'productionSpec','productionSpec',false)
-
32
model
-
end
-
-
1
def parse_xml_entry(entry)
-
16
return nil unless entry
-
16
model = self.new
-
16
self.parse_element_data(model, entry)
-
16
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
16
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
16
parse_primitive_field(model,entry,'lastSystemChange','lastSystemChange',false)
-
16
set_model_data(model, 'source', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:source')))
-
16
set_model_data(model, 'parent', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:parent')))
-
32
set_model_data(model, 'operationalStatus', entry.xpath('./fhir:operationalStatus').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
16
set_model_data(model, 'parameterGroup', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:parameterGroup')))
-
16
parse_primitive_field(model,entry,'measurementPrinciple','measurementPrinciple',false)
-
48
set_model_data(model, 'productionSpecification', entry.xpath('./fhir:productionSpecification').map {|e| parse_xml_entry_DeviceComponentProductionSpecificationComponent(e)})
-
16
set_model_data(model, 'languageCode', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:languageCode')))
-
16
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module DeviceMetric
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_DeviceMetricCalibrationComponent(entry)
-
return nil unless entry
-
model = FHIR::DeviceMetric::DeviceMetricCalibrationComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'type','fhirType',false)
-
parse_primitive_field(model,entry,'state','state',false)
-
parse_primitive_field(model,entry,'time','time',false)
-
model
-
end
-
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
8
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
8
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
8
set_model_data(model, 'unit', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:unit')))
-
8
set_model_data(model, 'source', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:source')))
-
8
set_model_data(model, 'parent', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:parent')))
-
8
parse_primitive_field(model,entry,'operationalStatus','operationalStatus',false)
-
8
parse_primitive_field(model,entry,'color','color',false)
-
8
parse_primitive_field(model,entry,'category','category',false)
-
8
set_model_data(model, 'measurementPeriod', FHIR::Timing.parse_xml_entry(entry.at_xpath('./fhir:measurementPeriod')))
-
8
set_model_data(model, 'calibration', entry.xpath('./fhir:calibration').map {|e| parse_xml_entry_DeviceMetricCalibrationComponent(e)})
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module DeviceUseRequest
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
16
return nil unless entry
-
16
model = self.new
-
16
self.parse_element_data(model, entry)
-
16
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'bodySiteCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:bodySiteCodeableConcept')))
-
16
set_model_data(model, 'bodySiteReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:bodySiteReference')))
-
16
parse_primitive_field(model,entry,'status','status',false)
-
16
set_model_data(model, 'device', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:device')))
-
16
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
16
set_model_data(model, 'indication', entry.xpath('./fhir:indication').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
16
parse_primitive_field(model,entry,'notes','notes',true)
-
16
set_model_data(model, 'prnReason', entry.xpath('./fhir:prnReason').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
16
parse_primitive_field(model,entry,'orderedOn','orderedOn',false)
-
16
parse_primitive_field(model,entry,'recordedOn','recordedOn',false)
-
16
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
16
set_model_data(model, 'timingTiming', FHIR::Timing.parse_xml_entry(entry.at_xpath('./fhir:timingTiming')))
-
16
set_model_data(model, 'timingPeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:timingPeriod')))
-
16
parse_primitive_field(model,entry,'timingDateTime','timingDateTime',false)
-
16
parse_primitive_field(model,entry,'priority','priority',false)
-
16
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module DeviceUseStatement
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
8
set_model_data(model, 'bodySiteCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:bodySiteCodeableConcept')))
-
8
set_model_data(model, 'bodySiteReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:bodySiteReference')))
-
8
set_model_data(model, 'whenUsed', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:whenUsed')))
-
8
set_model_data(model, 'device', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:device')))
-
8
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
8
set_model_data(model, 'indication', entry.xpath('./fhir:indication').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
8
parse_primitive_field(model,entry,'notes','notes',true)
-
8
parse_primitive_field(model,entry,'recordedOn','recordedOn',false)
-
8
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
8
set_model_data(model, 'timingTiming', FHIR::Timing.parse_xml_entry(entry.at_xpath('./fhir:timingTiming')))
-
8
set_model_data(model, 'timingPeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:timingPeriod')))
-
8
parse_primitive_field(model,entry,'timingDateTime','timingDateTime',false)
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module DiagnosticOrder
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_DiagnosticOrderEventComponent(entry)
-
48
return nil unless entry
-
48
model = FHIR::DiagnosticOrder::DiagnosticOrderEventComponent.new
-
48
self.parse_element_data(model, entry)
-
48
parse_primitive_field(model,entry,'status','status',false)
-
48
set_model_data(model, 'description', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:description')))
-
48
parse_primitive_field(model,entry,'dateTime','dateTime',false)
-
48
set_model_data(model, 'actor', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:actor')))
-
48
model
-
end
-
-
1
def parse_xml_entry_DiagnosticOrderItemComponent(entry)
-
48
return nil unless entry
-
48
model = FHIR::DiagnosticOrder::DiagnosticOrderItemComponent.new
-
48
self.parse_element_data(model, entry)
-
48
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
64
set_model_data(model, 'specimen', entry.xpath('./fhir:specimen').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
48
set_model_data(model, 'bodySite', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:bodySite')))
-
48
parse_primitive_field(model,entry,'status','status',false)
-
48
set_model_data(model, 'event', entry.xpath('./fhir:event').map {|e| parse_xml_entry_DiagnosticOrderEventComponent(e)})
-
48
model
-
end
-
-
1
def parse_xml_entry(entry)
-
1784
return nil unless entry
-
1784
model = self.new
-
1784
self.parse_element_data(model, entry)
-
1784
self.parse_resource_data(model, entry)
-
1784
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
1784
set_model_data(model, 'orderer', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:orderer')))
-
1816
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
1784
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
3544
set_model_data(model, 'reason', entry.xpath('./fhir:reason').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
1808
set_model_data(model, 'supportingInformation', entry.xpath('./fhir:supportingInformation').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
1792
set_model_data(model, 'specimen', entry.xpath('./fhir:specimen').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
1784
parse_primitive_field(model,entry,'status','status',false)
-
1784
parse_primitive_field(model,entry,'priority','priority',false)
-
1832
set_model_data(model, 'event', entry.xpath('./fhir:event').map {|e| parse_xml_entry_DiagnosticOrderEventComponent(e)})
-
1832
set_model_data(model, 'item', entry.xpath('./fhir:item').map {|e| parse_xml_entry_DiagnosticOrderItemComponent(e)})
-
1800
set_model_data(model, 'note', entry.xpath('./fhir:note').map {|e| FHIR::Annotation.parse_xml_entry(e)})
-
1784
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module DiagnosticReport
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_DiagnosticReportImageComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::DiagnosticReport::DiagnosticReportImageComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'comment','comment',false)
-
8
set_model_data(model, 'link', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:link')))
-
8
model
-
end
-
-
1
def parse_xml_entry(entry)
-
2880
return nil unless entry
-
2880
model = self.new
-
2880
self.parse_element_data(model, entry)
-
2880
self.parse_resource_data(model, entry)
-
5728
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
2880
parse_primitive_field(model,entry,'status','status',false)
-
2880
set_model_data(model, 'category', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:category')))
-
2880
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
2880
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
2880
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
2880
parse_primitive_field(model,entry,'effectiveDateTime','effectiveDateTime',false)
-
2880
set_model_data(model, 'effectivePeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:effectivePeriod')))
-
2880
parse_primitive_field(model,entry,'issued','issued',false)
-
2880
set_model_data(model, 'performer', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:performer')))
-
4624
set_model_data(model, 'request', entry.xpath('./fhir:request').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
2920
set_model_data(model, 'specimen', entry.xpath('./fhir:specimen').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
6192
set_model_data(model, 'result', entry.xpath('./fhir:result').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
2888
set_model_data(model, 'imagingStudy', entry.xpath('./fhir:imagingStudy').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
2888
set_model_data(model, 'image', entry.xpath('./fhir:image').map {|e| parse_xml_entry_DiagnosticReportImageComponent(e)})
-
2880
parse_primitive_field(model,entry,'conclusion','conclusion',false)
-
2912
set_model_data(model, 'codedDiagnosis', entry.xpath('./fhir:codedDiagnosis').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
2904
set_model_data(model, 'presentedForm', entry.xpath('./fhir:presentedForm').map {|e| FHIR::Attachment.parse_xml_entry(e)})
-
2880
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module DocumentManifest
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_DocumentManifestContentComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::DocumentManifest::DocumentManifestContentComponent.new
-
8
self.parse_element_data(model, entry)
-
8
set_model_data(model, 'pAttachment', FHIR::Attachment.parse_xml_entry(entry.at_xpath('./fhir:pAttachment')))
-
8
set_model_data(model, 'pReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:pReference')))
-
8
model
-
end
-
-
1
def parse_xml_entry_DocumentManifestRelatedComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::DocumentManifest::DocumentManifestRelatedComponent.new
-
8
self.parse_element_data(model, entry)
-
8
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
8
set_model_data(model, 'ref', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:ref')))
-
8
model
-
end
-
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
8
set_model_data(model, 'masterIdentifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:masterIdentifier')))
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
8
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
16
set_model_data(model, 'recipient', entry.xpath('./fhir:recipient').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
16
set_model_data(model, 'author', entry.xpath('./fhir:author').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
parse_primitive_field(model,entry,'created','created',false)
-
8
parse_primitive_field(model,entry,'source','source',false)
-
8
parse_primitive_field(model,entry,'status','status',false)
-
8
parse_primitive_field(model,entry,'description','description',false)
-
16
set_model_data(model, 'content', entry.xpath('./fhir:content').map {|e| parse_xml_entry_DocumentManifestContentComponent(e)})
-
16
set_model_data(model, 'related', entry.xpath('./fhir:related').map {|e| parse_xml_entry_DocumentManifestRelatedComponent(e)})
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module DocumentReference
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_DocumentReferenceRelatesToComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::DocumentReference::DocumentReferenceRelatesToComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'code','code',false)
-
8
set_model_data(model, 'target', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:target')))
-
8
model
-
end
-
-
1
def parse_xml_entry_DocumentReferenceContentComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::DocumentReference::DocumentReferenceContentComponent.new
-
16
self.parse_element_data(model, entry)
-
16
set_model_data(model, 'attachment', FHIR::Attachment.parse_xml_entry(entry.at_xpath('./fhir:attachment')))
-
32
set_model_data(model, 'format', entry.xpath('./fhir:format').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
16
model
-
end
-
-
1
def parse_xml_entry_DocumentReferenceContextRelatedComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::DocumentReference::DocumentReferenceContextRelatedComponent.new
-
8
self.parse_element_data(model, entry)
-
8
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
8
set_model_data(model, 'ref', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:ref')))
-
8
model
-
end
-
-
1
def parse_xml_entry_DocumentReferenceContextComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::DocumentReference::DocumentReferenceContextComponent.new
-
16
self.parse_element_data(model, entry)
-
16
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
24
set_model_data(model, 'event', entry.xpath('./fhir:event').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
16
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
16
set_model_data(model, 'facilityType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:facilityType')))
-
16
set_model_data(model, 'practiceSetting', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:practiceSetting')))
-
16
set_model_data(model, 'sourcePatientInfo', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:sourcePatientInfo')))
-
24
set_model_data(model, 'related', entry.xpath('./fhir:related').map {|e| parse_xml_entry_DocumentReferenceContextRelatedComponent(e)})
-
16
model
-
end
-
-
1
def parse_xml_entry(entry)
-
16
return nil unless entry
-
16
model = self.new
-
16
self.parse_element_data(model, entry)
-
16
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'masterIdentifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:masterIdentifier')))
-
24
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
16
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
16
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
16
set_model_data(model, 'fhirClass', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:class')))
-
48
set_model_data(model, 'author', entry.xpath('./fhir:author').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
16
set_model_data(model, 'custodian', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:custodian')))
-
16
set_model_data(model, 'authenticator', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:authenticator')))
-
16
parse_primitive_field(model,entry,'created','created',false)
-
16
parse_primitive_field(model,entry,'indexed','indexed',false)
-
16
parse_primitive_field(model,entry,'status','status',false)
-
16
set_model_data(model, 'docStatus', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:docStatus')))
-
24
set_model_data(model, 'relatesTo', entry.xpath('./fhir:relatesTo').map {|e| parse_xml_entry_DocumentReferenceRelatesToComponent(e)})
-
16
parse_primitive_field(model,entry,'description','description',false)
-
24
set_model_data(model, 'securityLabel', entry.xpath('./fhir:securityLabel').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
32
set_model_data(model, 'content', entry.xpath('./fhir:content').map {|e| parse_xml_entry_DocumentReferenceContentComponent(e)})
-
16
set_model_data(model, 'context', parse_xml_entry_DocumentReferenceContextComponent(entry.at_xpath('./fhir:context')))
-
16
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module ElementDefinition
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ElementDefinitionSlicingComponent(entry)
-
18581
return nil unless entry
-
257
model = FHIR::ElementDefinition::ElementDefinitionSlicingComponent.new
-
257
self.parse_element_data(model, entry)
-
257
parse_primitive_field(model,entry,'discriminator','discriminator',true)
-
257
parse_primitive_field(model,entry,'description','description',false)
-
257
parse_primitive_field(model,entry,'ordered','ordered',false)
-
257
parse_primitive_field(model,entry,'rules','rules',false)
-
257
model
-
end
-
-
1
def parse_xml_entry_ElementDefinitionBaseComponent(entry)
-
18581
return nil unless entry
-
8165
model = FHIR::ElementDefinition::ElementDefinitionBaseComponent.new
-
8165
self.parse_element_data(model, entry)
-
8165
parse_primitive_field(model,entry,'path','path',false)
-
8165
parse_primitive_field(model,entry,'min','min',false)
-
8165
parse_primitive_field(model,entry,'max','max',false)
-
8165
model
-
end
-
-
1
def parse_xml_entry_TypeRefComponent(entry)
-
21574
return nil unless entry
-
21574
model = FHIR::ElementDefinition::TypeRefComponent.new
-
21574
self.parse_element_data(model, entry)
-
21574
parse_primitive_field(model,entry,'code','code',false)
-
21574
parse_primitive_field(model,entry,'profile','profile',true)
-
21574
parse_primitive_field(model,entry,'aggregation','aggregation',true)
-
21574
model
-
end
-
-
1
def parse_xml_entry_ElementDefinitionConstraintComponent(entry)
-
564
return nil unless entry
-
564
model = FHIR::ElementDefinition::ElementDefinitionConstraintComponent.new
-
564
self.parse_element_data(model, entry)
-
564
parse_primitive_field(model,entry,'key','key',false)
-
564
parse_primitive_field(model,entry,'requirements','requirements',false)
-
564
parse_primitive_field(model,entry,'severity','severity',false)
-
564
parse_primitive_field(model,entry,'human','human',false)
-
564
parse_primitive_field(model,entry,'xpath','xpath',false)
-
564
model
-
end
-
-
1
def parse_xml_entry_ElementDefinitionBindingComponent(entry)
-
18581
return nil unless entry
-
2673
model = FHIR::ElementDefinition::ElementDefinitionBindingComponent.new
-
2673
self.parse_element_data(model, entry)
-
2673
parse_primitive_field(model,entry,'strength','strength',false)
-
2673
parse_primitive_field(model,entry,'description','description',false)
-
2673
parse_primitive_field(model,entry,'valueSetUri','valueSetUri',false)
-
2673
set_model_data(model, 'valueSetReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:valueSetReference')))
-
2673
model
-
end
-
-
1
def parse_xml_entry_ElementDefinitionMappingComponent(entry)
-
17836
return nil unless entry
-
17836
model = FHIR::ElementDefinition::ElementDefinitionMappingComponent.new
-
17836
self.parse_element_data(model, entry)
-
17836
parse_primitive_field(model,entry,'identity','fhirIdentity',false)
-
17836
parse_primitive_field(model,entry,'language','language',false)
-
17836
parse_primitive_field(model,entry,'map','map',false)
-
17836
model
-
end
-
-
1
def parse_xml_entry(entry)
-
18581
return nil unless entry
-
18581
model = self.new
-
18581
self.parse_element_data(model, entry)
-
18581
parse_primitive_field(model,entry,'path','path',false)
-
18581
parse_primitive_field(model,entry,'representation','representation',true)
-
18581
parse_primitive_field(model,entry,'name','name',false)
-
18581
parse_primitive_field(model,entry,'label','label',false)
-
18781
set_model_data(model, 'code', entry.xpath('./fhir:code').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
18581
set_model_data(model, 'slicing', parse_xml_entry_ElementDefinitionSlicingComponent(entry.at_xpath('./fhir:slicing')))
-
18581
parse_primitive_field(model,entry,'short','short',false)
-
18581
parse_primitive_field(model,entry,'definition','definition',false)
-
18581
parse_primitive_field(model,entry,'comments','comments',false)
-
18581
parse_primitive_field(model,entry,'requirements','requirements',false)
-
18581
parse_primitive_field(model,entry,'alias','alias',true)
-
18581
parse_primitive_field(model,entry,'min','min',false)
-
18581
parse_primitive_field(model,entry,'max','max',false)
-
18581
set_model_data(model, 'base', parse_xml_entry_ElementDefinitionBaseComponent(entry.at_xpath('./fhir:base')))
-
40155
set_model_data(model, 'fhirType', entry.xpath('./fhir:type').map {|e| parse_xml_entry_TypeRefComponent(e)})
-
18581
parse_primitive_field(model,entry,'nameReference','nameReference',false)
-
18581
entry.xpath("./*[contains(local-name(),'defaultValue')]").each do |e|
-
81
datatype = e.name.gsub('defaultValue','')
-
81
v = e.at_xpath('@value').try(:value)
-
81
if v.nil? && is_fhir_class?("FHIR::#{datatype}")
-
v = "FHIR::#{datatype}".constantize.parse_xml_entry(e)
-
end
-
81
model.defaultValue = FHIR::AnyType.new(datatype,v)
-
end
-
18581
parse_primitive_field(model,entry,'meaningWhenMissing','meaningWhenMissing',false)
-
18581
entry.xpath("./*[contains(local-name(),'fixed')]").each do |e|
-
949
datatype = e.name.gsub('fixed','')
-
949
v = e.at_xpath('@value').try(:value)
-
949
if v.nil? && is_fhir_class?("FHIR::#{datatype}")
-
26
v = "FHIR::#{datatype}".constantize.parse_xml_entry(e)
-
end
-
949
model.fixed = FHIR::AnyType.new(datatype,v)
-
end
-
18581
entry.xpath("./*[contains(local-name(),'pattern')]").each do |e|
-
2
datatype = e.name.gsub('pattern','')
-
2
v = e.at_xpath('@value').try(:value)
-
2
if v.nil? && is_fhir_class?("FHIR::#{datatype}")
-
2
v = "FHIR::#{datatype}".constantize.parse_xml_entry(e)
-
end
-
2
model.pattern = FHIR::AnyType.new(datatype,v)
-
end
-
18581
entry.xpath("./*[contains(local-name(),'example')]").each do |e|
-
241
datatype = e.name.gsub('example','')
-
241
v = e.at_xpath('@value').try(:value)
-
241
if v.nil? && is_fhir_class?("FHIR::#{datatype}")
-
17
v = "FHIR::#{datatype}".constantize.parse_xml_entry(e)
-
end
-
241
model.example = FHIR::AnyType.new(datatype,v)
-
end
-
18581
entry.xpath("./*[contains(local-name(),'minValue')]").each do |e|
-
2
datatype = e.name.gsub('minValue','')
-
2
v = e.at_xpath('@value').try(:value)
-
2
if v.nil? && is_fhir_class?("FHIR::#{datatype}")
-
v = "FHIR::#{datatype}".constantize.parse_xml_entry(e)
-
end
-
2
model.minValue = FHIR::AnyType.new(datatype,v)
-
end
-
18581
entry.xpath("./*[contains(local-name(),'maxValue')]").each do |e|
-
2
datatype = e.name.gsub('maxValue','')
-
2
v = e.at_xpath('@value').try(:value)
-
2
if v.nil? && is_fhir_class?("FHIR::#{datatype}")
-
v = "FHIR::#{datatype}".constantize.parse_xml_entry(e)
-
end
-
2
model.maxValue = FHIR::AnyType.new(datatype,v)
-
end
-
18581
parse_primitive_field(model,entry,'maxLength','maxLength',false)
-
18581
parse_primitive_field(model,entry,'condition','condition',true)
-
19145
set_model_data(model, 'constraint', entry.xpath('./fhir:constraint').map {|e| parse_xml_entry_ElementDefinitionConstraintComponent(e)})
-
18581
parse_primitive_field(model,entry,'mustSupport','mustSupport',false)
-
18581
parse_primitive_field(model,entry,'isModifier','isModifier',false)
-
18581
parse_primitive_field(model,entry,'isSummary','isSummary',false)
-
18581
set_model_data(model, 'binding', parse_xml_entry_ElementDefinitionBindingComponent(entry.at_xpath('./fhir:binding')))
-
36417
set_model_data(model, 'mapping', entry.xpath('./fhir:mapping').map {|e| parse_xml_entry_ElementDefinitionMappingComponent(e)})
-
18581
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module EligibilityRequest
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
8
set_model_data(model, 'ruleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:ruleset')))
-
8
set_model_data(model, 'originalRuleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:originalRuleset')))
-
8
parse_primitive_field(model,entry,'created','created',false)
-
8
set_model_data(model, 'target', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:target')))
-
8
set_model_data(model, 'provider', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:provider')))
-
8
set_model_data(model, 'organization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:organization')))
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module EligibilityResponse
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
8
set_model_data(model, 'request', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:request')))
-
8
parse_primitive_field(model,entry,'outcome','outcome',false)
-
8
parse_primitive_field(model,entry,'disposition','disposition',false)
-
8
set_model_data(model, 'ruleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:ruleset')))
-
8
set_model_data(model, 'originalRuleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:originalRuleset')))
-
8
parse_primitive_field(model,entry,'created','created',false)
-
8
set_model_data(model, 'organization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:organization')))
-
8
set_model_data(model, 'requestProvider', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:requestProvider')))
-
8
set_model_data(model, 'requestOrganization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:requestOrganization')))
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Encounter
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_EncounterStatusHistoryComponent(entry)
-
return nil unless entry
-
model = FHIR::Encounter::EncounterStatusHistoryComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'status','status',false)
-
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
model
-
end
-
-
1
def parse_xml_entry_EncounterParticipantComponent(entry)
-
64
return nil unless entry
-
64
model = FHIR::Encounter::EncounterParticipantComponent.new
-
64
self.parse_element_data(model, entry)
-
64
set_model_data(model, 'fhirType', entry.xpath('./fhir:type').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
64
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
64
set_model_data(model, 'individual', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:individual')))
-
64
model
-
end
-
-
1
def parse_xml_entry_EncounterHospitalizationComponent(entry)
-
88
return nil unless entry
-
48
model = FHIR::Encounter::EncounterHospitalizationComponent.new
-
48
self.parse_element_data(model, entry)
-
48
set_model_data(model, 'preAdmissionIdentifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:preAdmissionIdentifier')))
-
48
set_model_data(model, 'origin', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:origin')))
-
48
set_model_data(model, 'admitSource', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:admitSource')))
-
48
set_model_data(model, 'admittingDiagnosis', entry.xpath('./fhir:admittingDiagnosis').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
48
set_model_data(model, 'reAdmission', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:reAdmission')))
-
56
set_model_data(model, 'dietPreference', entry.xpath('./fhir:dietPreference').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
48
set_model_data(model, 'specialCourtesy', entry.xpath('./fhir:specialCourtesy').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
48
set_model_data(model, 'specialArrangement', entry.xpath('./fhir:specialArrangement').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
48
set_model_data(model, 'destination', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:destination')))
-
48
set_model_data(model, 'dischargeDisposition', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:dischargeDisposition')))
-
48
set_model_data(model, 'dischargeDiagnosis', entry.xpath('./fhir:dischargeDiagnosis').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
48
model
-
end
-
-
1
def parse_xml_entry_EncounterLocationComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::Encounter::EncounterLocationComponent.new
-
8
self.parse_element_data(model, entry)
-
8
set_model_data(model, 'location', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:location')))
-
8
parse_primitive_field(model,entry,'status','status',false)
-
8
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
8
model
-
end
-
-
1
def parse_xml_entry(entry)
-
88
return nil unless entry
-
88
model = self.new
-
88
self.parse_element_data(model, entry)
-
88
self.parse_resource_data(model, entry)
-
152
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
88
parse_primitive_field(model,entry,'status','status',false)
-
88
set_model_data(model, 'statusHistory', entry.xpath('./fhir:statusHistory').map {|e| parse_xml_entry_EncounterStatusHistoryComponent(e)})
-
88
parse_primitive_field(model,entry,'class','fhirClass',false)
-
144
set_model_data(model, 'fhirType', entry.xpath('./fhir:type').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
88
set_model_data(model, 'priority', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:priority')))
-
88
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
88
set_model_data(model, 'episodeOfCare', entry.xpath('./fhir:episodeOfCare').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
88
set_model_data(model, 'incomingReferral', entry.xpath('./fhir:incomingReferral').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
152
set_model_data(model, 'participant', entry.xpath('./fhir:participant').map {|e| parse_xml_entry_EncounterParticipantComponent(e)})
-
88
set_model_data(model, 'appointment', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:appointment')))
-
88
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
88
set_model_data(model, 'length', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:length')))
-
144
set_model_data(model, 'reason', entry.xpath('./fhir:reason').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
96
set_model_data(model, 'indication', entry.xpath('./fhir:indication').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
88
set_model_data(model, 'hospitalization', parse_xml_entry_EncounterHospitalizationComponent(entry.at_xpath('./fhir:hospitalization')))
-
96
set_model_data(model, 'location', entry.xpath('./fhir:location').map {|e| parse_xml_entry_EncounterLocationComponent(e)})
-
88
set_model_data(model, 'serviceProvider', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:serviceProvider')))
-
88
set_model_data(model, 'partOf', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:partOf')))
-
88
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module EnrollmentRequest
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
8
set_model_data(model, 'ruleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:ruleset')))
-
8
set_model_data(model, 'originalRuleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:originalRuleset')))
-
8
parse_primitive_field(model,entry,'created','created',false)
-
8
set_model_data(model, 'target', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:target')))
-
8
set_model_data(model, 'provider', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:provider')))
-
8
set_model_data(model, 'organization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:organization')))
-
8
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
8
set_model_data(model, 'coverage', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:coverage')))
-
8
set_model_data(model, 'relationship', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:relationship')))
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module EnrollmentResponse
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
8
set_model_data(model, 'request', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:request')))
-
8
parse_primitive_field(model,entry,'outcome','outcome',false)
-
8
parse_primitive_field(model,entry,'disposition','disposition',false)
-
8
set_model_data(model, 'ruleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:ruleset')))
-
8
set_model_data(model, 'originalRuleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:originalRuleset')))
-
8
parse_primitive_field(model,entry,'created','created',false)
-
8
set_model_data(model, 'organization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:organization')))
-
8
set_model_data(model, 'requestProvider', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:requestProvider')))
-
8
set_model_data(model, 'requestOrganization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:requestOrganization')))
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module EpisodeOfCare
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_EpisodeOfCareStatusHistoryComponent(entry)
-
32
return nil unless entry
-
32
model = FHIR::EpisodeOfCare::EpisodeOfCareStatusHistoryComponent.new
-
32
self.parse_element_data(model, entry)
-
32
parse_primitive_field(model,entry,'status','status',false)
-
32
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
32
model
-
end
-
-
1
def parse_xml_entry_EpisodeOfCareCareTeamComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::EpisodeOfCare::EpisodeOfCareCareTeamComponent.new
-
8
self.parse_element_data(model, entry)
-
16
set_model_data(model, 'role', entry.xpath('./fhir:role').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
8
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
8
set_model_data(model, 'member', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:member')))
-
8
model
-
end
-
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
8
parse_primitive_field(model,entry,'status','status',false)
-
40
set_model_data(model, 'statusHistory', entry.xpath('./fhir:statusHistory').map {|e| parse_xml_entry_EpisodeOfCareStatusHistoryComponent(e)})
-
16
set_model_data(model, 'fhirType', entry.xpath('./fhir:type').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
16
set_model_data(model, 'condition', entry.xpath('./fhir:condition').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
8
set_model_data(model, 'managingOrganization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:managingOrganization')))
-
8
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
16
set_model_data(model, 'referralRequest', entry.xpath('./fhir:referralRequest').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
set_model_data(model, 'careManager', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:careManager')))
-
16
set_model_data(model, 'careTeam', entry.xpath('./fhir:careTeam').map {|e| parse_xml_entry_EpisodeOfCareCareTeamComponent(e)})
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module ExplanationOfBenefit
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
8
set_model_data(model, 'request', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:request')))
-
8
parse_primitive_field(model,entry,'outcome','outcome',false)
-
8
parse_primitive_field(model,entry,'disposition','disposition',false)
-
8
set_model_data(model, 'ruleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:ruleset')))
-
8
set_model_data(model, 'originalRuleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:originalRuleset')))
-
8
parse_primitive_field(model,entry,'created','created',false)
-
8
set_model_data(model, 'organization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:organization')))
-
8
set_model_data(model, 'requestProvider', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:requestProvider')))
-
8
set_model_data(model, 'requestOrganization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:requestOrganization')))
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Extension
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
591685
return nil unless entry
-
8798
model = self.new
-
8798
self.parse_element_data(model, entry)
-
8798
set_model_data(model, 'url', entry.at_xpath('./@url').try(:value) )
-
8798
entry.xpath("./*[contains(local-name(),'value')]").each do |e|
-
8126
datatype = e.name.gsub('value','')
-
8126
v = e.at_xpath('@value').try(:value)
-
8126
if v.nil? && is_fhir_class?("FHIR::#{datatype}")
-
2418
v = "FHIR::#{datatype}".constantize.parse_xml_entry(e)
-
end
-
8126
model.value = FHIR::AnyType.new(datatype,v)
-
end
-
8798
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module FamilyMemberHistory
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_FamilyMemberHistoryConditionComponent(entry)
-
104
return nil unless entry
-
104
model = FHIR::FamilyMemberHistory::FamilyMemberHistoryConditionComponent.new
-
104
self.parse_element_data(model, entry)
-
104
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
104
set_model_data(model, 'outcome', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:outcome')))
-
104
set_model_data(model, 'onsetQuantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:onsetQuantity')))
-
104
set_model_data(model, 'onsetRange', FHIR::Range.parse_xml_entry(entry.at_xpath('./fhir:onsetRange')))
-
104
set_model_data(model, 'onsetPeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:onsetPeriod')))
-
104
parse_primitive_field(model,entry,'onsetString','onsetString',false)
-
104
set_model_data(model, 'note', FHIR::Annotation.parse_xml_entry(entry.at_xpath('./fhir:note')))
-
104
model
-
end
-
-
1
def parse_xml_entry(entry)
-
264
return nil unless entry
-
264
model = self.new
-
264
self.parse_element_data(model, entry)
-
264
self.parse_resource_data(model, entry)
-
264
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
264
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
264
parse_primitive_field(model,entry,'date','date',false)
-
264
parse_primitive_field(model,entry,'status','status',false)
-
264
parse_primitive_field(model,entry,'name','name',false)
-
264
set_model_data(model, 'relationship', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:relationship')))
-
264
parse_primitive_field(model,entry,'gender','gender',false)
-
264
set_model_data(model, 'bornPeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:bornPeriod')))
-
264
parse_primitive_field(model,entry,'bornDate','bornDate',false)
-
264
parse_primitive_field(model,entry,'bornString','bornString',false)
-
264
set_model_data(model, 'ageQuantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:ageQuantity')))
-
264
set_model_data(model, 'ageRange', FHIR::Range.parse_xml_entry(entry.at_xpath('./fhir:ageRange')))
-
264
parse_primitive_field(model,entry,'ageString','ageString',false)
-
264
parse_primitive_field(model,entry,'deceasedBoolean','deceasedBoolean',false)
-
264
set_model_data(model, 'deceasedQuantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:deceasedQuantity')))
-
264
set_model_data(model, 'deceasedRange', FHIR::Range.parse_xml_entry(entry.at_xpath('./fhir:deceasedRange')))
-
264
parse_primitive_field(model,entry,'deceasedDate','deceasedDate',false)
-
264
parse_primitive_field(model,entry,'deceasedString','deceasedString',false)
-
264
set_model_data(model, 'note', FHIR::Annotation.parse_xml_entry(entry.at_xpath('./fhir:note')))
-
368
set_model_data(model, 'condition', entry.xpath('./fhir:condition').map {|e| parse_xml_entry_FamilyMemberHistoryConditionComponent(e)})
-
264
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Flag
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
24
return nil unless entry
-
24
model = self.new
-
24
self.parse_element_data(model, entry)
-
24
self.parse_resource_data(model, entry)
-
24
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
24
set_model_data(model, 'category', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:category')))
-
24
parse_primitive_field(model,entry,'status','status',false)
-
24
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
24
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
24
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
24
set_model_data(model, 'author', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:author')))
-
24
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
24
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Goal
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_GoalOutcomeComponent(entry)
-
return nil unless entry
-
model = FHIR::Goal::GoalOutcomeComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'resultCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:resultCodeableConcept')))
-
set_model_data(model, 'resultReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:resultReference')))
-
model
-
end
-
-
1
def parse_xml_entry(entry)
-
128
return nil unless entry
-
128
model = self.new
-
128
self.parse_element_data(model, entry)
-
128
self.parse_resource_data(model, entry)
-
128
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
128
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
128
parse_primitive_field(model,entry,'startDate','startDate',false)
-
128
set_model_data(model, 'startCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:startCodeableConcept')))
-
128
parse_primitive_field(model,entry,'targetDate','targetDate',false)
-
128
set_model_data(model, 'targetQuantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:targetQuantity')))
-
136
set_model_data(model, 'category', entry.xpath('./fhir:category').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
128
parse_primitive_field(model,entry,'description','description',false)
-
128
parse_primitive_field(model,entry,'status','status',false)
-
128
parse_primitive_field(model,entry,'statusDate','statusDate',false)
-
128
set_model_data(model, 'statusReason', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:statusReason')))
-
128
set_model_data(model, 'author', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:author')))
-
128
set_model_data(model, 'priority', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:priority')))
-
144
set_model_data(model, 'addresses', entry.xpath('./fhir:addresses').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
152
set_model_data(model, 'note', entry.xpath('./fhir:note').map {|e| FHIR::Annotation.parse_xml_entry(e)})
-
128
set_model_data(model, 'outcome', entry.xpath('./fhir:outcome').map {|e| parse_xml_entry_GoalOutcomeComponent(e)})
-
128
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Group
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_GroupCharacteristicComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::Group::GroupCharacteristicComponent.new
-
16
self.parse_element_data(model, entry)
-
16
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
16
set_model_data(model, 'valueCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:valueCodeableConcept')))
-
16
parse_primitive_field(model,entry,'valueBoolean','valueBoolean',false)
-
16
set_model_data(model, 'valueQuantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:valueQuantity')))
-
16
set_model_data(model, 'valueRange', FHIR::Range.parse_xml_entry(entry.at_xpath('./fhir:valueRange')))
-
16
parse_primitive_field(model,entry,'exclude','exclude',false)
-
16
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
16
model
-
end
-
-
1
def parse_xml_entry_GroupMemberComponent(entry)
-
32
return nil unless entry
-
32
model = FHIR::Group::GroupMemberComponent.new
-
32
self.parse_element_data(model, entry)
-
32
set_model_data(model, 'entity', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:entity')))
-
32
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
32
parse_primitive_field(model,entry,'inactive','inactive',false)
-
32
model
-
end
-
-
1
def parse_xml_entry(entry)
-
16
return nil unless entry
-
16
model = self.new
-
16
self.parse_element_data(model, entry)
-
16
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
16
parse_primitive_field(model,entry,'type','fhirType',false)
-
16
parse_primitive_field(model,entry,'actual','actual',false)
-
16
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
16
parse_primitive_field(model,entry,'name','name',false)
-
16
parse_primitive_field(model,entry,'quantity','quantity',false)
-
32
set_model_data(model, 'characteristic', entry.xpath('./fhir:characteristic').map {|e| parse_xml_entry_GroupCharacteristicComponent(e)})
-
48
set_model_data(model, 'member', entry.xpath('./fhir:member').map {|e| parse_xml_entry_GroupMemberComponent(e)})
-
16
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module HealthcareService
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ServiceTypeComponent(entry)
-
return nil unless entry
-
model = FHIR::HealthcareService::ServiceTypeComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
set_model_data(model, 'specialty', entry.xpath('./fhir:specialty').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
model
-
end
-
-
1
def parse_xml_entry_HealthcareServiceAvailableTimeComponent(entry)
-
return nil unless entry
-
model = FHIR::HealthcareService::HealthcareServiceAvailableTimeComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'daysOfWeek','daysOfWeek',true)
-
parse_primitive_field(model,entry,'allDay','allDay',false)
-
parse_primitive_field(model,entry,'availableStartTime','availableStartTime',false)
-
parse_primitive_field(model,entry,'availableEndTime','availableEndTime',false)
-
model
-
end
-
-
1
def parse_xml_entry_HealthcareServiceNotAvailableComponent(entry)
-
return nil unless entry
-
model = FHIR::HealthcareService::HealthcareServiceNotAvailableComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'description','description',false)
-
set_model_data(model, 'during', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:during')))
-
model
-
end
-
-
1
def parse_xml_entry(entry)
-
return nil unless entry
-
model = self.new
-
self.parse_element_data(model, entry)
-
self.parse_resource_data(model, entry)
-
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
set_model_data(model, 'providedBy', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:providedBy')))
-
set_model_data(model, 'serviceCategory', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:serviceCategory')))
-
set_model_data(model, 'serviceType', entry.xpath('./fhir:serviceType').map {|e| parse_xml_entry_ServiceTypeComponent(e)})
-
set_model_data(model, 'location', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:location')))
-
parse_primitive_field(model,entry,'serviceName','serviceName',false)
-
parse_primitive_field(model,entry,'comment','comment',false)
-
parse_primitive_field(model,entry,'extraDetails','extraDetails',false)
-
set_model_data(model, 'photo', FHIR::Attachment.parse_xml_entry(entry.at_xpath('./fhir:photo')))
-
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
set_model_data(model, 'coverageArea', entry.xpath('./fhir:coverageArea').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
set_model_data(model, 'serviceProvisionCode', entry.xpath('./fhir:serviceProvisionCode').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
set_model_data(model, 'eligibility', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:eligibility')))
-
parse_primitive_field(model,entry,'eligibilityNote','eligibilityNote',false)
-
parse_primitive_field(model,entry,'programName','programName',true)
-
set_model_data(model, 'characteristic', entry.xpath('./fhir:characteristic').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
set_model_data(model, 'referralMethod', entry.xpath('./fhir:referralMethod').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
parse_primitive_field(model,entry,'publicKey','publicKey',false)
-
parse_primitive_field(model,entry,'appointmentRequired','appointmentRequired',false)
-
set_model_data(model, 'availableTime', entry.xpath('./fhir:availableTime').map {|e| parse_xml_entry_HealthcareServiceAvailableTimeComponent(e)})
-
set_model_data(model, 'notAvailable', entry.xpath('./fhir:notAvailable').map {|e| parse_xml_entry_HealthcareServiceNotAvailableComponent(e)})
-
parse_primitive_field(model,entry,'availabilityExceptions','availabilityExceptions',false)
-
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module HumanName
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
2880
return nil unless entry
-
2848
model = self.new
-
2848
self.parse_element_data(model, entry)
-
2848
parse_primitive_field(model,entry,'use','use',false)
-
2848
parse_primitive_field(model,entry,'text','text',false)
-
2848
parse_primitive_field(model,entry,'family','family',true)
-
2848
parse_primitive_field(model,entry,'given','given',true)
-
2848
parse_primitive_field(model,entry,'prefix','prefix',true)
-
2848
parse_primitive_field(model,entry,'suffix','suffix',true)
-
2848
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
2848
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Identifier
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
9204
return nil unless entry
-
7435
model = self.new
-
7435
self.parse_element_data(model, entry)
-
7435
parse_primitive_field(model,entry,'use','use',false)
-
7435
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
7435
parse_primitive_field(model,entry,'system','system',false)
-
7435
parse_primitive_field(model,entry,'value','value',false)
-
7435
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
7435
set_model_data(model, 'assigner', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:assigner')))
-
7435
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module ImagingObjectSelection
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_FramesComponent(entry)
-
return nil unless entry
-
model = FHIR::ImagingObjectSelection::FramesComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'frameNumbers','frameNumbers',true)
-
parse_primitive_field(model,entry,'url','url',false)
-
model
-
end
-
-
1
def parse_xml_entry_InstanceComponent(entry)
-
24
return nil unless entry
-
24
model = FHIR::ImagingObjectSelection::InstanceComponent.new
-
24
self.parse_element_data(model, entry)
-
24
parse_primitive_field(model,entry,'sopClass','sopClass',false)
-
24
parse_primitive_field(model,entry,'uid','uid',false)
-
24
parse_primitive_field(model,entry,'url','url',false)
-
24
set_model_data(model, 'frames', entry.xpath('./fhir:frames').map {|e| parse_xml_entry_FramesComponent(e)})
-
24
model
-
end
-
-
1
def parse_xml_entry_SeriesComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::ImagingObjectSelection::SeriesComponent.new
-
16
self.parse_element_data(model, entry)
-
16
parse_primitive_field(model,entry,'uid','uid',false)
-
16
parse_primitive_field(model,entry,'url','url',false)
-
40
set_model_data(model, 'instance', entry.xpath('./fhir:instance').map {|e| parse_xml_entry_InstanceComponent(e)})
-
16
model
-
end
-
-
1
def parse_xml_entry_StudyComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::ImagingObjectSelection::StudyComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'uid','uid',false)
-
8
parse_primitive_field(model,entry,'url','url',false)
-
8
set_model_data(model, 'imagingStudy', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:imagingStudy')))
-
24
set_model_data(model, 'series', entry.xpath('./fhir:series').map {|e| parse_xml_entry_SeriesComponent(e)})
-
8
model
-
end
-
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
8
parse_primitive_field(model,entry,'uid','uid',false)
-
8
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
8
set_model_data(model, 'title', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:title')))
-
8
parse_primitive_field(model,entry,'description','description',false)
-
8
set_model_data(model, 'author', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:author')))
-
8
parse_primitive_field(model,entry,'authoringTime','authoringTime',false)
-
16
set_model_data(model, 'study', entry.xpath('./fhir:study').map {|e| parse_xml_entry_StudyComponent(e)})
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module ImagingStudy
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ImagingStudySeriesInstanceComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::ImagingStudy::ImagingStudySeriesInstanceComponent.new
-
16
self.parse_element_data(model, entry)
-
16
parse_primitive_field(model,entry,'number','number',false)
-
16
parse_primitive_field(model,entry,'uid','uid',false)
-
16
parse_primitive_field(model,entry,'sopClass','sopClass',false)
-
16
parse_primitive_field(model,entry,'type','fhirType',false)
-
16
parse_primitive_field(model,entry,'title','title',false)
-
32
set_model_data(model, 'content', entry.xpath('./fhir:content').map {|e| FHIR::Attachment.parse_xml_entry(e)})
-
16
model
-
end
-
-
1
def parse_xml_entry_ImagingStudySeriesComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::ImagingStudy::ImagingStudySeriesComponent.new
-
16
self.parse_element_data(model, entry)
-
16
parse_primitive_field(model,entry,'number','number',false)
-
16
set_model_data(model, 'modality', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:modality')))
-
16
parse_primitive_field(model,entry,'uid','uid',false)
-
16
parse_primitive_field(model,entry,'description','description',false)
-
16
parse_primitive_field(model,entry,'numberOfInstances','numberOfInstances',false)
-
16
parse_primitive_field(model,entry,'availability','availability',false)
-
16
parse_primitive_field(model,entry,'url','url',false)
-
16
set_model_data(model, 'bodySite', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:bodySite')))
-
16
set_model_data(model, 'laterality', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:laterality')))
-
16
parse_primitive_field(model,entry,'started','started',false)
-
32
set_model_data(model, 'instance', entry.xpath('./fhir:instance').map {|e| parse_xml_entry_ImagingStudySeriesInstanceComponent(e)})
-
16
model
-
end
-
-
1
def parse_xml_entry(entry)
-
16
return nil unless entry
-
16
model = self.new
-
16
self.parse_element_data(model, entry)
-
16
self.parse_resource_data(model, entry)
-
16
parse_primitive_field(model,entry,'started','started',false)
-
16
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
16
parse_primitive_field(model,entry,'uid','uid',false)
-
16
set_model_data(model, 'accession', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:accession')))
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
16
set_model_data(model, 'order', entry.xpath('./fhir:order').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
16
set_model_data(model, 'modalityList', entry.xpath('./fhir:modalityList').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
16
set_model_data(model, 'referrer', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:referrer')))
-
16
parse_primitive_field(model,entry,'availability','availability',false)
-
16
parse_primitive_field(model,entry,'url','url',false)
-
16
parse_primitive_field(model,entry,'numberOfSeries','numberOfSeries',false)
-
16
parse_primitive_field(model,entry,'numberOfInstances','numberOfInstances',false)
-
16
set_model_data(model, 'procedure', entry.xpath('./fhir:procedure').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
16
set_model_data(model, 'interpreter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:interpreter')))
-
16
parse_primitive_field(model,entry,'description','description',false)
-
32
set_model_data(model, 'series', entry.xpath('./fhir:series').map {|e| parse_xml_entry_ImagingStudySeriesComponent(e)})
-
16
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Immunization
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ImmunizationExplanationComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::Immunization::ImmunizationExplanationComponent.new
-
16
self.parse_element_data(model, entry)
-
24
set_model_data(model, 'reason', entry.xpath('./fhir:reason').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
24
set_model_data(model, 'reasonNotGiven', entry.xpath('./fhir:reasonNotGiven').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
16
model
-
end
-
-
1
def parse_xml_entry_ImmunizationReactionComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::Immunization::ImmunizationReactionComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'date','date',false)
-
8
set_model_data(model, 'detail', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:detail')))
-
8
parse_primitive_field(model,entry,'reported','reported',false)
-
8
model
-
end
-
-
1
def parse_xml_entry_ImmunizationVaccinationProtocolComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::Immunization::ImmunizationVaccinationProtocolComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'doseSequence','doseSequence',false)
-
8
parse_primitive_field(model,entry,'description','description',false)
-
8
set_model_data(model, 'authority', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:authority')))
-
8
parse_primitive_field(model,entry,'series','series',false)
-
8
parse_primitive_field(model,entry,'seriesDoses','seriesDoses',false)
-
16
set_model_data(model, 'targetDisease', entry.xpath('./fhir:targetDisease').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
8
set_model_data(model, 'doseStatus', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:doseStatus')))
-
8
set_model_data(model, 'doseStatusReason', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:doseStatusReason')))
-
8
model
-
end
-
-
1
def parse_xml_entry(entry)
-
16
return nil unless entry
-
16
model = self.new
-
16
self.parse_element_data(model, entry)
-
16
self.parse_resource_data(model, entry)
-
24
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
16
parse_primitive_field(model,entry,'status','status',false)
-
16
parse_primitive_field(model,entry,'date','date',false)
-
16
set_model_data(model, 'vaccineCode', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:vaccineCode')))
-
16
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
16
parse_primitive_field(model,entry,'wasNotGiven','wasNotGiven',false)
-
16
parse_primitive_field(model,entry,'reported','reported',false)
-
16
set_model_data(model, 'performer', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:performer')))
-
16
set_model_data(model, 'requester', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:requester')))
-
16
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
16
set_model_data(model, 'manufacturer', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:manufacturer')))
-
16
set_model_data(model, 'location', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:location')))
-
16
parse_primitive_field(model,entry,'lotNumber','lotNumber',false)
-
16
parse_primitive_field(model,entry,'expirationDate','expirationDate',false)
-
16
set_model_data(model, 'site', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:site')))
-
16
set_model_data(model, 'route', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:route')))
-
16
set_model_data(model, 'doseQuantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:doseQuantity')))
-
24
set_model_data(model, 'note', entry.xpath('./fhir:note').map {|e| FHIR::Annotation.parse_xml_entry(e)})
-
16
set_model_data(model, 'explanation', parse_xml_entry_ImmunizationExplanationComponent(entry.at_xpath('./fhir:explanation')))
-
24
set_model_data(model, 'reaction', entry.xpath('./fhir:reaction').map {|e| parse_xml_entry_ImmunizationReactionComponent(e)})
-
24
set_model_data(model, 'vaccinationProtocol', entry.xpath('./fhir:vaccinationProtocol').map {|e| parse_xml_entry_ImmunizationVaccinationProtocolComponent(e)})
-
16
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module ImmunizationRecommendation
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ImmunizationRecommendationRecommendationDateCriterionComponent(entry)
-
24
return nil unless entry
-
24
model = FHIR::ImmunizationRecommendation::ImmunizationRecommendationRecommendationDateCriterionComponent.new
-
24
self.parse_element_data(model, entry)
-
24
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
24
parse_primitive_field(model,entry,'value','value',false)
-
24
model
-
end
-
-
1
def parse_xml_entry_ImmunizationRecommendationRecommendationProtocolComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::ImmunizationRecommendation::ImmunizationRecommendationRecommendationProtocolComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'doseSequence','doseSequence',false)
-
8
parse_primitive_field(model,entry,'description','description',false)
-
8
set_model_data(model, 'authority', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:authority')))
-
8
parse_primitive_field(model,entry,'series','series',false)
-
8
model
-
end
-
-
1
def parse_xml_entry_ImmunizationRecommendationRecommendationComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::ImmunizationRecommendation::ImmunizationRecommendationRecommendationComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'date','date',false)
-
8
set_model_data(model, 'vaccineCode', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:vaccineCode')))
-
8
parse_primitive_field(model,entry,'doseNumber','doseNumber',false)
-
8
set_model_data(model, 'forecastStatus', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:forecastStatus')))
-
32
set_model_data(model, 'dateCriterion', entry.xpath('./fhir:dateCriterion').map {|e| parse_xml_entry_ImmunizationRecommendationRecommendationDateCriterionComponent(e)})
-
8
set_model_data(model, 'protocol', parse_xml_entry_ImmunizationRecommendationRecommendationProtocolComponent(entry.at_xpath('./fhir:protocol')))
-
16
set_model_data(model, 'supportingImmunization', entry.xpath('./fhir:supportingImmunization').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
16
set_model_data(model, 'supportingPatientInformation', entry.xpath('./fhir:supportingPatientInformation').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
model
-
end
-
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
8
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
16
set_model_data(model, 'recommendation', entry.xpath('./fhir:recommendation').map {|e| parse_xml_entry_ImmunizationRecommendationRecommendationComponent(e)})
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module ImplementationGuide
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ImplementationGuideContactComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::ImplementationGuide::ImplementationGuideContactComponent.new
-
16
self.parse_element_data(model, entry)
-
16
parse_primitive_field(model,entry,'name','name',false)
-
32
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
16
model
-
end
-
-
1
def parse_xml_entry_ImplementationGuideDependencyComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::ImplementationGuide::ImplementationGuideDependencyComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'type','fhirType',false)
-
8
parse_primitive_field(model,entry,'uri','uri',false)
-
8
model
-
end
-
-
1
def parse_xml_entry_ImplementationGuidePackageResourceComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::ImplementationGuide::ImplementationGuidePackageResourceComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'purpose','purpose',false)
-
8
parse_primitive_field(model,entry,'name','name',false)
-
8
parse_primitive_field(model,entry,'description','description',false)
-
8
parse_primitive_field(model,entry,'acronym','acronym',false)
-
8
parse_primitive_field(model,entry,'sourceUri','sourceUri',false)
-
8
set_model_data(model, 'sourceReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:sourceReference')))
-
8
set_model_data(model, 'exampleFor', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:exampleFor')))
-
8
model
-
end
-
-
1
def parse_xml_entry_ImplementationGuidePackageComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::ImplementationGuide::ImplementationGuidePackageComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'name','name',false)
-
8
parse_primitive_field(model,entry,'description','description',false)
-
16
set_model_data(model, 'resource', entry.xpath('./fhir:resource').map {|e| parse_xml_entry_ImplementationGuidePackageResourceComponent(e)})
-
8
model
-
end
-
-
1
def parse_xml_entry_ImplementationGuideGlobalComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::ImplementationGuide::ImplementationGuideGlobalComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'type','fhirType',false)
-
8
set_model_data(model, 'profile', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:profile')))
-
8
model
-
end
-
-
1
def parse_xml_entry_ImplementationGuidePageComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::ImplementationGuide::ImplementationGuidePageComponent.new
-
16
self.parse_element_data(model, entry)
-
16
parse_primitive_field(model,entry,'source','source',false)
-
16
parse_primitive_field(model,entry,'name','name',false)
-
16
parse_primitive_field(model,entry,'kind','kind',false)
-
16
parse_primitive_field(model,entry,'type','fhirType',true)
-
16
parse_primitive_field(model,entry,'package','package',true)
-
16
parse_primitive_field(model,entry,'format','format',false)
-
24
set_model_data(model, 'page', entry.xpath('./fhir:page').map {|e| parse_xml_entry_ImplementationGuidePageComponent(e)})
-
16
model
-
end
-
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
8
parse_primitive_field(model,entry,'url','url',false)
-
8
parse_primitive_field(model,entry,'version','versionNum',false)
-
8
parse_primitive_field(model,entry,'name','name',false)
-
8
parse_primitive_field(model,entry,'status','status',false)
-
8
parse_primitive_field(model,entry,'experimental','experimental',false)
-
8
parse_primitive_field(model,entry,'publisher','publisher',false)
-
24
set_model_data(model, 'contact', entry.xpath('./fhir:contact').map {|e| parse_xml_entry_ImplementationGuideContactComponent(e)})
-
8
parse_primitive_field(model,entry,'date','date',false)
-
8
parse_primitive_field(model,entry,'description','description',false)
-
16
set_model_data(model, 'useContext', entry.xpath('./fhir:useContext').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
8
parse_primitive_field(model,entry,'copyright','copyright',false)
-
8
parse_primitive_field(model,entry,'fhirVersion','fhirVersion',false)
-
16
set_model_data(model, 'dependency', entry.xpath('./fhir:dependency').map {|e| parse_xml_entry_ImplementationGuideDependencyComponent(e)})
-
16
set_model_data(model, 'package', entry.xpath('./fhir:package').map {|e| parse_xml_entry_ImplementationGuidePackageComponent(e)})
-
16
set_model_data(model, 'global', entry.xpath('./fhir:global').map {|e| parse_xml_entry_ImplementationGuideGlobalComponent(e)})
-
8
parse_primitive_field(model,entry,'binary','binary',true)
-
8
set_model_data(model, 'page', parse_xml_entry_ImplementationGuidePageComponent(entry.at_xpath('./fhir:page')))
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module List
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ListEntryComponent(entry)
-
288
return nil unless entry
-
288
model = FHIR::List::ListEntryComponent.new
-
288
self.parse_element_data(model, entry)
-
288
set_model_data(model, 'flag', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:flag')))
-
288
parse_primitive_field(model,entry,'deleted','fhirDeleted',false)
-
288
parse_primitive_field(model,entry,'date','date',false)
-
288
set_model_data(model, 'item', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:item')))
-
288
model
-
end
-
-
1
def parse_xml_entry(entry)
-
56
return nil unless entry
-
56
model = self.new
-
56
self.parse_element_data(model, entry)
-
56
self.parse_resource_data(model, entry)
-
64
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
56
parse_primitive_field(model,entry,'title','title',false)
-
56
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
56
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
56
set_model_data(model, 'source', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:source')))
-
56
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
56
parse_primitive_field(model,entry,'status','status',false)
-
56
parse_primitive_field(model,entry,'date','date',false)
-
56
set_model_data(model, 'orderedBy', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:orderedBy')))
-
56
parse_primitive_field(model,entry,'mode','mode',false)
-
56
parse_primitive_field(model,entry,'note','note',false)
-
344
set_model_data(model, 'entry', entry.xpath('./fhir:entry').map {|e| parse_xml_entry_ListEntryComponent(e)})
-
56
set_model_data(model, 'emptyReason', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:emptyReason')))
-
56
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Location
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_LocationPositionComponent(entry)
-
56
return nil unless entry
-
16
model = FHIR::Location::LocationPositionComponent.new
-
16
self.parse_element_data(model, entry)
-
16
parse_primitive_field(model,entry,'longitude','longitude',false)
-
16
parse_primitive_field(model,entry,'latitude','latitude',false)
-
16
parse_primitive_field(model,entry,'altitude','altitude',false)
-
16
model
-
end
-
-
1
def parse_xml_entry(entry)
-
56
return nil unless entry
-
56
model = self.new
-
56
self.parse_element_data(model, entry)
-
56
self.parse_resource_data(model, entry)
-
72
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
56
parse_primitive_field(model,entry,'status','status',false)
-
56
parse_primitive_field(model,entry,'name','name',false)
-
56
parse_primitive_field(model,entry,'description','description',false)
-
56
parse_primitive_field(model,entry,'mode','mode',false)
-
56
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
128
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
56
set_model_data(model, 'address', FHIR::Address.parse_xml_entry(entry.at_xpath('./fhir:address')))
-
56
set_model_data(model, 'physicalType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:physicalType')))
-
56
set_model_data(model, 'position', parse_xml_entry_LocationPositionComponent(entry.at_xpath('./fhir:position')))
-
56
set_model_data(model, 'managingOrganization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:managingOrganization')))
-
56
set_model_data(model, 'partOf', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:partOf')))
-
56
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Media
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
24
return nil unless entry
-
24
model = self.new
-
24
self.parse_element_data(model, entry)
-
24
self.parse_resource_data(model, entry)
-
24
parse_primitive_field(model,entry,'type','fhirType',false)
-
24
set_model_data(model, 'subtype', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:subtype')))
-
56
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
24
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
24
set_model_data(model, 'operator', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:operator')))
-
24
set_model_data(model, 'view', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:view')))
-
24
parse_primitive_field(model,entry,'deviceName','deviceName',false)
-
24
parse_primitive_field(model,entry,'height','height',false)
-
24
parse_primitive_field(model,entry,'width','width',false)
-
24
parse_primitive_field(model,entry,'frames','frames',false)
-
24
parse_primitive_field(model,entry,'duration','duration',false)
-
24
set_model_data(model, 'content', FHIR::Attachment.parse_xml_entry(entry.at_xpath('./fhir:content')))
-
24
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Medication
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_MedicationProductIngredientComponent(entry)
-
56
return nil unless entry
-
56
model = FHIR::Medication::MedicationProductIngredientComponent.new
-
56
self.parse_element_data(model, entry)
-
56
set_model_data(model, 'item', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:item')))
-
56
set_model_data(model, 'amount', FHIR::Ratio.parse_xml_entry(entry.at_xpath('./fhir:amount')))
-
56
model
-
end
-
-
1
def parse_xml_entry_MedicationProductBatchComponent(entry)
-
return nil unless entry
-
model = FHIR::Medication::MedicationProductBatchComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'lotNumber','lotNumber',false)
-
parse_primitive_field(model,entry,'expirationDate','expirationDate',false)
-
model
-
end
-
-
1
def parse_xml_entry_MedicationProductComponent(entry)
-
112
return nil unless entry
-
48
model = FHIR::Medication::MedicationProductComponent.new
-
48
self.parse_element_data(model, entry)
-
48
set_model_data(model, 'form', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:form')))
-
104
set_model_data(model, 'ingredient', entry.xpath('./fhir:ingredient').map {|e| parse_xml_entry_MedicationProductIngredientComponent(e)})
-
48
set_model_data(model, 'batch', entry.xpath('./fhir:batch').map {|e| parse_xml_entry_MedicationProductBatchComponent(e)})
-
48
model
-
end
-
-
1
def parse_xml_entry_MedicationPackageContentComponent(entry)
-
return nil unless entry
-
model = FHIR::Medication::MedicationPackageContentComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'item', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:item')))
-
set_model_data(model, 'amount', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:amount')))
-
model
-
end
-
-
1
def parse_xml_entry_MedicationPackageComponent(entry)
-
112
return nil unless entry
-
32
model = FHIR::Medication::MedicationPackageComponent.new
-
32
self.parse_element_data(model, entry)
-
32
set_model_data(model, 'container', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:container')))
-
32
set_model_data(model, 'content', entry.xpath('./fhir:content').map {|e| parse_xml_entry_MedicationPackageContentComponent(e)})
-
32
model
-
end
-
-
1
def parse_xml_entry(entry)
-
112
return nil unless entry
-
112
model = self.new
-
112
self.parse_element_data(model, entry)
-
112
self.parse_resource_data(model, entry)
-
112
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
112
parse_primitive_field(model,entry,'isBrand','isBrand',false)
-
112
set_model_data(model, 'manufacturer', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:manufacturer')))
-
112
set_model_data(model, 'product', parse_xml_entry_MedicationProductComponent(entry.at_xpath('./fhir:product')))
-
112
set_model_data(model, 'package', parse_xml_entry_MedicationPackageComponent(entry.at_xpath('./fhir:package')))
-
112
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module MedicationAdministration
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_MedicationAdministrationDosageComponent(entry)
-
return nil unless entry
-
model = FHIR::MedicationAdministration::MedicationAdministrationDosageComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'text','text',false)
-
set_model_data(model, 'siteCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:siteCodeableConcept')))
-
set_model_data(model, 'siteReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:siteReference')))
-
set_model_data(model, 'route', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:route')))
-
set_model_data(model, 'method', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:method')))
-
set_model_data(model, 'quantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:quantity')))
-
set_model_data(model, 'rateRatio', FHIR::Ratio.parse_xml_entry(entry.at_xpath('./fhir:rateRatio')))
-
set_model_data(model, 'rateRange', FHIR::Range.parse_xml_entry(entry.at_xpath('./fhir:rateRange')))
-
model
-
end
-
-
1
def parse_xml_entry(entry)
-
return nil unless entry
-
model = self.new
-
self.parse_element_data(model, entry)
-
self.parse_resource_data(model, entry)
-
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
parse_primitive_field(model,entry,'status','status',false)
-
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
set_model_data(model, 'practitioner', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:practitioner')))
-
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
set_model_data(model, 'prescription', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:prescription')))
-
parse_primitive_field(model,entry,'wasNotGiven','wasNotGiven',false)
-
set_model_data(model, 'reasonNotGiven', entry.xpath('./fhir:reasonNotGiven').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
set_model_data(model, 'reasonGiven', entry.xpath('./fhir:reasonGiven').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
parse_primitive_field(model,entry,'effectiveTimeDateTime','effectiveTimeDateTime',false)
-
set_model_data(model, 'effectiveTimePeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:effectiveTimePeriod')))
-
set_model_data(model, 'medicationCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:medicationCodeableConcept')))
-
set_model_data(model, 'medicationReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:medicationReference')))
-
set_model_data(model, 'device', entry.xpath('./fhir:device').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
parse_primitive_field(model,entry,'note','note',false)
-
set_model_data(model, 'dosage', parse_xml_entry_MedicationAdministrationDosageComponent(entry.at_xpath('./fhir:dosage')))
-
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module MedicationDispense
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_MedicationDispenseDosageInstructionComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::MedicationDispense::MedicationDispenseDosageInstructionComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'text','text',false)
-
8
set_model_data(model, 'additionalInstructions', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:additionalInstructions')))
-
8
set_model_data(model, 'timing', FHIR::Timing.parse_xml_entry(entry.at_xpath('./fhir:timing')))
-
8
parse_primitive_field(model,entry,'asNeededBoolean','asNeededBoolean',false)
-
8
set_model_data(model, 'asNeededCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:asNeededCodeableConcept')))
-
8
set_model_data(model, 'siteCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:siteCodeableConcept')))
-
8
set_model_data(model, 'siteReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:siteReference')))
-
8
set_model_data(model, 'route', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:route')))
-
8
set_model_data(model, 'method', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:method')))
-
8
set_model_data(model, 'doseRange', FHIR::Range.parse_xml_entry(entry.at_xpath('./fhir:doseRange')))
-
8
set_model_data(model, 'doseQuantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:doseQuantity')))
-
8
set_model_data(model, 'rateRatio', FHIR::Ratio.parse_xml_entry(entry.at_xpath('./fhir:rateRatio')))
-
8
set_model_data(model, 'rateRange', FHIR::Range.parse_xml_entry(entry.at_xpath('./fhir:rateRange')))
-
8
set_model_data(model, 'maxDosePerPeriod', FHIR::Ratio.parse_xml_entry(entry.at_xpath('./fhir:maxDosePerPeriod')))
-
8
model
-
end
-
-
1
def parse_xml_entry_MedicationDispenseSubstitutionComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::MedicationDispense::MedicationDispenseSubstitutionComponent.new
-
8
self.parse_element_data(model, entry)
-
8
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
8
set_model_data(model, 'reason', entry.xpath('./fhir:reason').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
8
set_model_data(model, 'responsibleParty', entry.xpath('./fhir:responsibleParty').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
model
-
end
-
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
8
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
8
parse_primitive_field(model,entry,'status','status',false)
-
8
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
8
set_model_data(model, 'dispenser', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:dispenser')))
-
16
set_model_data(model, 'authorizingPrescription', entry.xpath('./fhir:authorizingPrescription').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
8
set_model_data(model, 'quantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:quantity')))
-
8
set_model_data(model, 'daysSupply', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:daysSupply')))
-
8
set_model_data(model, 'medicationCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:medicationCodeableConcept')))
-
8
set_model_data(model, 'medicationReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:medicationReference')))
-
8
parse_primitive_field(model,entry,'whenPrepared','whenPrepared',false)
-
8
parse_primitive_field(model,entry,'whenHandedOver','whenHandedOver',false)
-
8
set_model_data(model, 'destination', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:destination')))
-
8
set_model_data(model, 'receiver', entry.xpath('./fhir:receiver').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
parse_primitive_field(model,entry,'note','note',false)
-
16
set_model_data(model, 'dosageInstruction', entry.xpath('./fhir:dosageInstruction').map {|e| parse_xml_entry_MedicationDispenseDosageInstructionComponent(e)})
-
8
set_model_data(model, 'substitution', parse_xml_entry_MedicationDispenseSubstitutionComponent(entry.at_xpath('./fhir:substitution')))
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module MedicationOrder
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_MedicationOrderDosageInstructionComponent(entry)
-
88
return nil unless entry
-
88
model = FHIR::MedicationOrder::MedicationOrderDosageInstructionComponent.new
-
88
self.parse_element_data(model, entry)
-
88
parse_primitive_field(model,entry,'text','text',false)
-
88
set_model_data(model, 'additionalInstructions', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:additionalInstructions')))
-
88
set_model_data(model, 'timing', FHIR::Timing.parse_xml_entry(entry.at_xpath('./fhir:timing')))
-
88
parse_primitive_field(model,entry,'asNeededBoolean','asNeededBoolean',false)
-
88
set_model_data(model, 'asNeededCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:asNeededCodeableConcept')))
-
88
set_model_data(model, 'siteCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:siteCodeableConcept')))
-
88
set_model_data(model, 'siteReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:siteReference')))
-
88
set_model_data(model, 'route', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:route')))
-
88
set_model_data(model, 'method', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:method')))
-
88
set_model_data(model, 'doseRange', FHIR::Range.parse_xml_entry(entry.at_xpath('./fhir:doseRange')))
-
88
set_model_data(model, 'doseQuantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:doseQuantity')))
-
88
set_model_data(model, 'rateRatio', FHIR::Ratio.parse_xml_entry(entry.at_xpath('./fhir:rateRatio')))
-
88
set_model_data(model, 'rateRange', FHIR::Range.parse_xml_entry(entry.at_xpath('./fhir:rateRange')))
-
88
set_model_data(model, 'maxDosePerPeriod', FHIR::Ratio.parse_xml_entry(entry.at_xpath('./fhir:maxDosePerPeriod')))
-
88
model
-
end
-
-
1
def parse_xml_entry_MedicationOrderDispenseRequestComponent(entry)
-
96
return nil unless entry
-
56
model = FHIR::MedicationOrder::MedicationOrderDispenseRequestComponent.new
-
56
self.parse_element_data(model, entry)
-
56
set_model_data(model, 'medicationCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:medicationCodeableConcept')))
-
56
set_model_data(model, 'medicationReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:medicationReference')))
-
56
set_model_data(model, 'validityPeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:validityPeriod')))
-
56
parse_primitive_field(model,entry,'numberOfRepeatsAllowed','numberOfRepeatsAllowed',false)
-
56
set_model_data(model, 'quantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:quantity')))
-
56
set_model_data(model, 'expectedSupplyDuration', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:expectedSupplyDuration')))
-
56
model
-
end
-
-
1
def parse_xml_entry_MedicationOrderSubstitutionComponent(entry)
-
96
return nil unless entry
-
model = FHIR::MedicationOrder::MedicationOrderSubstitutionComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
set_model_data(model, 'reason', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:reason')))
-
model
-
end
-
-
1
def parse_xml_entry(entry)
-
96
return nil unless entry
-
96
model = self.new
-
96
self.parse_element_data(model, entry)
-
96
self.parse_resource_data(model, entry)
-
136
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
96
parse_primitive_field(model,entry,'dateWritten','dateWritten',false)
-
96
parse_primitive_field(model,entry,'status','status',false)
-
96
parse_primitive_field(model,entry,'dateEnded','dateEnded',false)
-
96
set_model_data(model, 'reasonEnded', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:reasonEnded')))
-
96
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
96
set_model_data(model, 'prescriber', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:prescriber')))
-
96
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
96
set_model_data(model, 'reasonCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:reasonCodeableConcept')))
-
96
set_model_data(model, 'reasonReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:reasonReference')))
-
96
parse_primitive_field(model,entry,'note','note',false)
-
96
set_model_data(model, 'medicationCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:medicationCodeableConcept')))
-
96
set_model_data(model, 'medicationReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:medicationReference')))
-
184
set_model_data(model, 'dosageInstruction', entry.xpath('./fhir:dosageInstruction').map {|e| parse_xml_entry_MedicationOrderDosageInstructionComponent(e)})
-
96
set_model_data(model, 'dispenseRequest', parse_xml_entry_MedicationOrderDispenseRequestComponent(entry.at_xpath('./fhir:dispenseRequest')))
-
96
set_model_data(model, 'substitution', parse_xml_entry_MedicationOrderSubstitutionComponent(entry.at_xpath('./fhir:substitution')))
-
96
set_model_data(model, 'priorPrescription', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:priorPrescription')))
-
96
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module MedicationStatement
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_MedicationStatementDosageComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::MedicationStatement::MedicationStatementDosageComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'text','text',false)
-
8
set_model_data(model, 'timing', FHIR::Timing.parse_xml_entry(entry.at_xpath('./fhir:timing')))
-
8
parse_primitive_field(model,entry,'asNeededBoolean','asNeededBoolean',false)
-
8
set_model_data(model, 'asNeededCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:asNeededCodeableConcept')))
-
8
set_model_data(model, 'siteCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:siteCodeableConcept')))
-
8
set_model_data(model, 'siteReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:siteReference')))
-
8
set_model_data(model, 'route', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:route')))
-
8
set_model_data(model, 'method', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:method')))
-
8
set_model_data(model, 'quantityQuantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:quantityQuantity')))
-
8
set_model_data(model, 'quantityRange', FHIR::Range.parse_xml_entry(entry.at_xpath('./fhir:quantityRange')))
-
8
set_model_data(model, 'rateRatio', FHIR::Ratio.parse_xml_entry(entry.at_xpath('./fhir:rateRatio')))
-
8
set_model_data(model, 'rateRange', FHIR::Range.parse_xml_entry(entry.at_xpath('./fhir:rateRange')))
-
8
set_model_data(model, 'maxDosePerPeriod', FHIR::Ratio.parse_xml_entry(entry.at_xpath('./fhir:maxDosePerPeriod')))
-
8
model
-
end
-
-
1
def parse_xml_entry(entry)
-
16
return nil unless entry
-
16
model = self.new
-
16
self.parse_element_data(model, entry)
-
16
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
16
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
16
set_model_data(model, 'informationSource', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:informationSource')))
-
16
parse_primitive_field(model,entry,'dateAsserted','dateAsserted',false)
-
16
parse_primitive_field(model,entry,'status','status',false)
-
16
parse_primitive_field(model,entry,'wasNotTaken','wasNotTaken',false)
-
24
set_model_data(model, 'reasonNotTaken', entry.xpath('./fhir:reasonNotTaken').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
16
set_model_data(model, 'reasonForUseCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:reasonForUseCodeableConcept')))
-
16
set_model_data(model, 'reasonForUseReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:reasonForUseReference')))
-
16
parse_primitive_field(model,entry,'effectiveDateTime','effectiveDateTime',false)
-
16
set_model_data(model, 'effectivePeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:effectivePeriod')))
-
16
parse_primitive_field(model,entry,'note','note',false)
-
16
set_model_data(model, 'supportingInformation', entry.xpath('./fhir:supportingInformation').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
16
set_model_data(model, 'medicationCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:medicationCodeableConcept')))
-
16
set_model_data(model, 'medicationReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:medicationReference')))
-
24
set_model_data(model, 'dosage', entry.xpath('./fhir:dosage').map {|e| parse_xml_entry_MedicationStatementDosageComponent(e)})
-
16
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module MessageHeader
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_MessageHeaderResponseComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::MessageHeader::MessageHeaderResponseComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'identifier','identifier',false)
-
8
parse_primitive_field(model,entry,'code','code',false)
-
8
set_model_data(model, 'details', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:details')))
-
8
model
-
end
-
-
1
def parse_xml_entry_MessageSourceComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::MessageHeader::MessageSourceComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'name','name',false)
-
8
parse_primitive_field(model,entry,'software','software',false)
-
8
parse_primitive_field(model,entry,'version','versionNum',false)
-
8
set_model_data(model, 'contact', FHIR::ContactPoint.parse_xml_entry(entry.at_xpath('./fhir:contact')))
-
8
parse_primitive_field(model,entry,'endpoint','endpoint',false)
-
8
model
-
end
-
-
1
def parse_xml_entry_MessageDestinationComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::MessageHeader::MessageDestinationComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'name','name',false)
-
8
set_model_data(model, 'target', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:target')))
-
8
parse_primitive_field(model,entry,'endpoint','endpoint',false)
-
8
model
-
end
-
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
8
parse_primitive_field(model,entry,'timestamp','timestamp',false)
-
8
set_model_data(model, 'event', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:event')))
-
8
set_model_data(model, 'response', parse_xml_entry_MessageHeaderResponseComponent(entry.at_xpath('./fhir:response')))
-
8
set_model_data(model, 'source', parse_xml_entry_MessageSourceComponent(entry.at_xpath('./fhir:source')))
-
16
set_model_data(model, 'destination', entry.xpath('./fhir:destination').map {|e| parse_xml_entry_MessageDestinationComponent(e)})
-
8
set_model_data(model, 'enterer', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:enterer')))
-
8
set_model_data(model, 'author', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:author')))
-
8
set_model_data(model, 'receiver', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:receiver')))
-
8
set_model_data(model, 'responsible', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:responsible')))
-
8
set_model_data(model, 'reason', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:reason')))
-
16
set_model_data(model, 'data', entry.xpath('./fhir:data').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Meta
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
return nil unless entry
-
model = self.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'versionId','versionId',false)
-
parse_primitive_field(model,entry,'lastUpdated','lastUpdated',false)
-
parse_primitive_field(model,entry,'profile','profile',true)
-
set_model_data(model, 'security', entry.xpath('./fhir:security').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
set_model_data(model, 'tag', entry.xpath('./fhir:tag').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module NamingSystem
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_NamingSystemContactComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::NamingSystem::NamingSystemContactComponent.new
-
16
self.parse_element_data(model, entry)
-
16
parse_primitive_field(model,entry,'name','name',false)
-
32
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
16
model
-
end
-
-
1
def parse_xml_entry_NamingSystemUniqueIdComponent(entry)
-
40
return nil unless entry
-
40
model = FHIR::NamingSystem::NamingSystemUniqueIdComponent.new
-
40
self.parse_element_data(model, entry)
-
40
parse_primitive_field(model,entry,'type','fhirType',false)
-
40
parse_primitive_field(model,entry,'value','value',false)
-
40
parse_primitive_field(model,entry,'preferred','preferred',false)
-
40
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
40
model
-
end
-
-
1
def parse_xml_entry(entry)
-
24
return nil unless entry
-
24
model = self.new
-
24
self.parse_element_data(model, entry)
-
24
self.parse_resource_data(model, entry)
-
24
parse_primitive_field(model,entry,'name','name',false)
-
24
parse_primitive_field(model,entry,'status','status',false)
-
24
parse_primitive_field(model,entry,'kind','kind',false)
-
24
parse_primitive_field(model,entry,'publisher','publisher',false)
-
40
set_model_data(model, 'contact', entry.xpath('./fhir:contact').map {|e| parse_xml_entry_NamingSystemContactComponent(e)})
-
24
parse_primitive_field(model,entry,'responsible','responsible',false)
-
24
parse_primitive_field(model,entry,'date','date',false)
-
24
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
24
parse_primitive_field(model,entry,'description','description',false)
-
32
set_model_data(model, 'useContext', entry.xpath('./fhir:useContext').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
24
parse_primitive_field(model,entry,'usage','usage',false)
-
64
set_model_data(model, 'uniqueId', entry.xpath('./fhir:uniqueId').map {|e| parse_xml_entry_NamingSystemUniqueIdComponent(e)})
-
24
set_model_data(model, 'replacedBy', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:replacedBy')))
-
24
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Narrative
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
16723
return nil unless entry
-
8488
model = self.new
-
8488
self.parse_element_data(model, entry)
-
8488
parse_primitive_field(model,entry,'status','status',false)
-
8488
ignored = ""
-
8488
array = entry.xpath("./*[local-name()='div']")
-
16976
array.each { |e| ignored += e.to_s }
-
8488
set_model_data(model, 'div', ignored )
-
8488
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module NutritionOrder
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_NutritionOrderOralDietNutrientComponent(entry)
-
56
return nil unless entry
-
56
model = FHIR::NutritionOrder::NutritionOrderOralDietNutrientComponent.new
-
56
self.parse_element_data(model, entry)
-
56
set_model_data(model, 'fhirModifier', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:modifier')))
-
56
set_model_data(model, 'amount', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:amount')))
-
56
model
-
end
-
-
1
def parse_xml_entry_NutritionOrderOralDietTextureComponent(entry)
-
24
return nil unless entry
-
24
model = FHIR::NutritionOrder::NutritionOrderOralDietTextureComponent.new
-
24
self.parse_element_data(model, entry)
-
24
set_model_data(model, 'fhirModifier', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:modifier')))
-
24
set_model_data(model, 'foodType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:foodType')))
-
24
model
-
end
-
-
1
def parse_xml_entry_NutritionOrderOralDietComponent(entry)
-
104
return nil unless entry
-
56
model = FHIR::NutritionOrder::NutritionOrderOralDietComponent.new
-
56
self.parse_element_data(model, entry)
-
128
set_model_data(model, 'fhirType', entry.xpath('./fhir:type').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
104
set_model_data(model, 'schedule', entry.xpath('./fhir:schedule').map {|e| FHIR::Timing.parse_xml_entry(e)})
-
112
set_model_data(model, 'nutrient', entry.xpath('./fhir:nutrient').map {|e| parse_xml_entry_NutritionOrderOralDietNutrientComponent(e)})
-
80
set_model_data(model, 'texture', entry.xpath('./fhir:texture').map {|e| parse_xml_entry_NutritionOrderOralDietTextureComponent(e)})
-
72
set_model_data(model, 'fluidConsistencyType', entry.xpath('./fhir:fluidConsistencyType').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
56
parse_primitive_field(model,entry,'instruction','instruction',false)
-
56
model
-
end
-
-
1
def parse_xml_entry_NutritionOrderSupplementComponent(entry)
-
32
return nil unless entry
-
32
model = FHIR::NutritionOrder::NutritionOrderSupplementComponent.new
-
32
self.parse_element_data(model, entry)
-
32
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
32
parse_primitive_field(model,entry,'productName','productName',false)
-
64
set_model_data(model, 'schedule', entry.xpath('./fhir:schedule').map {|e| FHIR::Timing.parse_xml_entry(e)})
-
32
set_model_data(model, 'quantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:quantity')))
-
32
parse_primitive_field(model,entry,'instruction','instruction',false)
-
32
model
-
end
-
-
1
def parse_xml_entry_NutritionOrderEnteralFormulaAdministrationComponent(entry)
-
40
return nil unless entry
-
40
model = FHIR::NutritionOrder::NutritionOrderEnteralFormulaAdministrationComponent.new
-
40
self.parse_element_data(model, entry)
-
40
set_model_data(model, 'schedule', FHIR::Timing.parse_xml_entry(entry.at_xpath('./fhir:schedule')))
-
40
set_model_data(model, 'quantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:quantity')))
-
40
set_model_data(model, 'rateQuantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:rateQuantity')))
-
40
set_model_data(model, 'rateRatio', FHIR::Ratio.parse_xml_entry(entry.at_xpath('./fhir:rateRatio')))
-
40
model
-
end
-
-
1
def parse_xml_entry_NutritionOrderEnteralFormulaComponent(entry)
-
104
return nil unless entry
-
24
model = FHIR::NutritionOrder::NutritionOrderEnteralFormulaComponent.new
-
24
self.parse_element_data(model, entry)
-
24
set_model_data(model, 'baseFormulaType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:baseFormulaType')))
-
24
parse_primitive_field(model,entry,'baseFormulaProductName','baseFormulaProductName',false)
-
24
set_model_data(model, 'additiveType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:additiveType')))
-
24
parse_primitive_field(model,entry,'additiveProductName','additiveProductName',false)
-
24
set_model_data(model, 'caloricDensity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:caloricDensity')))
-
24
set_model_data(model, 'routeofAdministration', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:routeofAdministration')))
-
64
set_model_data(model, 'administration', entry.xpath('./fhir:administration').map {|e| parse_xml_entry_NutritionOrderEnteralFormulaAdministrationComponent(e)})
-
24
set_model_data(model, 'maxVolumeToDeliver', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:maxVolumeToDeliver')))
-
24
parse_primitive_field(model,entry,'administrationInstruction','administrationInstruction',false)
-
24
model
-
end
-
-
1
def parse_xml_entry(entry)
-
104
return nil unless entry
-
104
model = self.new
-
104
self.parse_element_data(model, entry)
-
104
self.parse_resource_data(model, entry)
-
104
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
104
set_model_data(model, 'orderer', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:orderer')))
-
208
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
104
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
104
parse_primitive_field(model,entry,'dateTime','dateTime',false)
-
104
parse_primitive_field(model,entry,'status','status',false)
-
168
set_model_data(model, 'allergyIntolerance', entry.xpath('./fhir:allergyIntolerance').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
168
set_model_data(model, 'foodPreferenceModifier', entry.xpath('./fhir:foodPreferenceModifier').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
168
set_model_data(model, 'excludeFoodModifier', entry.xpath('./fhir:excludeFoodModifier').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
104
set_model_data(model, 'oralDiet', parse_xml_entry_NutritionOrderOralDietComponent(entry.at_xpath('./fhir:oralDiet')))
-
136
set_model_data(model, 'supplement', entry.xpath('./fhir:supplement').map {|e| parse_xml_entry_NutritionOrderSupplementComponent(e)})
-
104
set_model_data(model, 'enteralFormula', parse_xml_entry_NutritionOrderEnteralFormulaComponent(entry.at_xpath('./fhir:enteralFormula')))
-
104
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Observation
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ObservationReferenceRangeComponent(entry)
-
3440
return nil unless entry
-
3440
model = FHIR::Observation::ObservationReferenceRangeComponent.new
-
3440
self.parse_element_data(model, entry)
-
3440
set_model_data(model, 'low', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:low')))
-
3440
set_model_data(model, 'high', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:high')))
-
3440
set_model_data(model, 'meaning', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:meaning')))
-
3440
set_model_data(model, 'age', FHIR::Range.parse_xml_entry(entry.at_xpath('./fhir:age')))
-
3440
parse_primitive_field(model,entry,'text','text',false)
-
3440
model
-
end
-
-
1
def parse_xml_entry_ObservationRelatedComponent(entry)
-
432
return nil unless entry
-
432
model = FHIR::Observation::ObservationRelatedComponent.new
-
432
self.parse_element_data(model, entry)
-
432
parse_primitive_field(model,entry,'type','fhirType',false)
-
432
set_model_data(model, 'target', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:target')))
-
432
model
-
end
-
-
1
def parse_xml_entry_ObservationComponentComponent(entry)
-
104
return nil unless entry
-
104
model = FHIR::Observation::ObservationComponentComponent.new
-
104
self.parse_element_data(model, entry)
-
104
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
104
set_model_data(model, 'valueQuantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:valueQuantity')))
-
104
set_model_data(model, 'valueCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:valueCodeableConcept')))
-
104
parse_primitive_field(model,entry,'valueString','valueString',false)
-
104
set_model_data(model, 'valueRange', FHIR::Range.parse_xml_entry(entry.at_xpath('./fhir:valueRange')))
-
104
set_model_data(model, 'valueRatio', FHIR::Ratio.parse_xml_entry(entry.at_xpath('./fhir:valueRatio')))
-
104
set_model_data(model, 'valueSampledData', FHIR::SampledData.parse_xml_entry(entry.at_xpath('./fhir:valueSampledData')))
-
104
set_model_data(model, 'valueAttachment', FHIR::Attachment.parse_xml_entry(entry.at_xpath('./fhir:valueAttachment')))
-
104
parse_primitive_field(model,entry,'valueTime','valueTime',false)
-
104
parse_primitive_field(model,entry,'valueDateTime','valueDateTime',false)
-
104
set_model_data(model, 'valuePeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:valuePeriod')))
-
104
set_model_data(model, 'dataAbsentReason', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:dataAbsentReason')))
-
120
set_model_data(model, 'referenceRange', entry.xpath('./fhir:referenceRange').map {|e| parse_xml_entry_ObservationReferenceRangeComponent(e)})
-
104
model
-
end
-
-
1
def parse_xml_entry(entry)
-
3960
return nil unless entry
-
3960
model = self.new
-
3960
self.parse_element_data(model, entry)
-
3960
self.parse_resource_data(model, entry)
-
4120
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
3960
parse_primitive_field(model,entry,'status','status',false)
-
3960
set_model_data(model, 'category', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:category')))
-
3960
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
3960
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
3960
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
3960
parse_primitive_field(model,entry,'effectiveDateTime','effectiveDateTime',false)
-
3960
set_model_data(model, 'effectivePeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:effectivePeriod')))
-
3960
parse_primitive_field(model,entry,'issued','issued',false)
-
7704
set_model_data(model, 'performer', entry.xpath('./fhir:performer').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
3960
set_model_data(model, 'valueQuantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:valueQuantity')))
-
3960
set_model_data(model, 'valueCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:valueCodeableConcept')))
-
3960
parse_primitive_field(model,entry,'valueString','valueString',false)
-
3960
set_model_data(model, 'valueRange', FHIR::Range.parse_xml_entry(entry.at_xpath('./fhir:valueRange')))
-
3960
set_model_data(model, 'valueRatio', FHIR::Ratio.parse_xml_entry(entry.at_xpath('./fhir:valueRatio')))
-
3960
set_model_data(model, 'valueSampledData', FHIR::SampledData.parse_xml_entry(entry.at_xpath('./fhir:valueSampledData')))
-
3960
set_model_data(model, 'valueAttachment', FHIR::Attachment.parse_xml_entry(entry.at_xpath('./fhir:valueAttachment')))
-
3960
parse_primitive_field(model,entry,'valueTime','valueTime',false)
-
3960
parse_primitive_field(model,entry,'valueDateTime','valueDateTime',false)
-
3960
set_model_data(model, 'valuePeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:valuePeriod')))
-
3960
set_model_data(model, 'dataAbsentReason', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:dataAbsentReason')))
-
3960
set_model_data(model, 'interpretation', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:interpretation')))
-
3960
parse_primitive_field(model,entry,'comments','comments',false)
-
3960
set_model_data(model, 'bodySite', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:bodySite')))
-
3960
set_model_data(model, 'method', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:method')))
-
3960
set_model_data(model, 'specimen', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:specimen')))
-
3960
set_model_data(model, 'device', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:device')))
-
7384
set_model_data(model, 'referenceRange', entry.xpath('./fhir:referenceRange').map {|e| parse_xml_entry_ObservationReferenceRangeComponent(e)})
-
4392
set_model_data(model, 'related', entry.xpath('./fhir:related').map {|e| parse_xml_entry_ObservationRelatedComponent(e)})
-
4064
set_model_data(model, 'component', entry.xpath('./fhir:component').map {|e| parse_xml_entry_ObservationComponentComponent(e)})
-
3960
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module OperationDefinition
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_OperationDefinitionContactComponent(entry)
-
26
return nil unless entry
-
26
model = FHIR::OperationDefinition::OperationDefinitionContactComponent.new
-
26
self.parse_element_data(model, entry)
-
26
parse_primitive_field(model,entry,'name','name',false)
-
70
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
26
model
-
end
-
-
1
def parse_xml_entry_OperationDefinitionParameterBindingComponent(entry)
-
112
return nil unless entry
-
1
model = FHIR::OperationDefinition::OperationDefinitionParameterBindingComponent.new
-
1
self.parse_element_data(model, entry)
-
1
parse_primitive_field(model,entry,'strength','strength',false)
-
1
parse_primitive_field(model,entry,'valueSetUri','valueSetUri',false)
-
1
set_model_data(model, 'valueSetReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:valueSetReference')))
-
1
model
-
end
-
-
1
def parse_xml_entry_OperationDefinitionParameterComponent(entry)
-
112
return nil unless entry
-
112
model = FHIR::OperationDefinition::OperationDefinitionParameterComponent.new
-
112
self.parse_element_data(model, entry)
-
112
parse_primitive_field(model,entry,'name','name',false)
-
112
parse_primitive_field(model,entry,'use','use',false)
-
112
parse_primitive_field(model,entry,'min','min',false)
-
112
parse_primitive_field(model,entry,'max','max',false)
-
112
parse_primitive_field(model,entry,'documentation','documentation',false)
-
112
parse_primitive_field(model,entry,'type','fhirType',false)
-
112
set_model_data(model, 'profile', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:profile')))
-
112
set_model_data(model, 'binding', parse_xml_entry_OperationDefinitionParameterBindingComponent(entry.at_xpath('./fhir:binding')))
-
122
set_model_data(model, 'part', entry.xpath('./fhir:part').map {|e| parse_xml_entry_OperationDefinitionParameterComponent(e)})
-
112
model
-
end
-
-
1
def parse_xml_entry(entry)
-
26
return nil unless entry
-
26
model = self.new
-
26
self.parse_element_data(model, entry)
-
26
self.parse_resource_data(model, entry)
-
26
parse_primitive_field(model,entry,'url','url',false)
-
26
parse_primitive_field(model,entry,'version','versionNum',false)
-
26
parse_primitive_field(model,entry,'name','name',false)
-
26
parse_primitive_field(model,entry,'status','status',false)
-
26
parse_primitive_field(model,entry,'kind','kind',false)
-
26
parse_primitive_field(model,entry,'experimental','experimental',false)
-
26
parse_primitive_field(model,entry,'publisher','publisher',false)
-
52
set_model_data(model, 'contact', entry.xpath('./fhir:contact').map {|e| parse_xml_entry_OperationDefinitionContactComponent(e)})
-
26
parse_primitive_field(model,entry,'date','date',false)
-
26
parse_primitive_field(model,entry,'description','description',false)
-
26
parse_primitive_field(model,entry,'requirements','requirements',false)
-
26
parse_primitive_field(model,entry,'idempotent','idempotent',false)
-
26
parse_primitive_field(model,entry,'code','code',false)
-
26
parse_primitive_field(model,entry,'notes','notes',false)
-
26
set_model_data(model, 'base', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:base')))
-
26
parse_primitive_field(model,entry,'system','system',false)
-
26
parse_primitive_field(model,entry,'type','fhirType',true)
-
26
parse_primitive_field(model,entry,'instance','instance',false)
-
128
set_model_data(model, 'parameter', entry.xpath('./fhir:parameter').map {|e| parse_xml_entry_OperationDefinitionParameterComponent(e)})
-
26
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module OperationOutcome
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_OperationOutcomeIssueComponent(entry)
-
48
return nil unless entry
-
48
model = FHIR::OperationOutcome::OperationOutcomeIssueComponent.new
-
48
self.parse_element_data(model, entry)
-
48
parse_primitive_field(model,entry,'severity','severity',false)
-
48
parse_primitive_field(model,entry,'code','code',false)
-
48
set_model_data(model, 'details', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:details')))
-
48
parse_primitive_field(model,entry,'diagnostics','diagnostics',false)
-
48
parse_primitive_field(model,entry,'location','location',true)
-
48
model
-
end
-
-
1
def parse_xml_entry(entry)
-
48
return nil unless entry
-
48
model = self.new
-
48
self.parse_element_data(model, entry)
-
48
self.parse_resource_data(model, entry)
-
96
set_model_data(model, 'issue', entry.xpath('./fhir:issue').map {|e| parse_xml_entry_OperationOutcomeIssueComponent(e)})
-
48
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Order
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_OrderWhenComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::Order::OrderWhenComponent.new
-
16
self.parse_element_data(model, entry)
-
16
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
16
set_model_data(model, 'schedule', FHIR::Timing.parse_xml_entry(entry.at_xpath('./fhir:schedule')))
-
16
model
-
end
-
-
1
def parse_xml_entry(entry)
-
16
return nil unless entry
-
16
model = self.new
-
16
self.parse_element_data(model, entry)
-
16
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
16
parse_primitive_field(model,entry,'date','date',false)
-
16
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
16
set_model_data(model, 'source', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:source')))
-
16
set_model_data(model, 'target', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:target')))
-
16
set_model_data(model, 'reasonCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:reasonCodeableConcept')))
-
16
set_model_data(model, 'reasonReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:reasonReference')))
-
16
set_model_data(model, 'when', parse_xml_entry_OrderWhenComponent(entry.at_xpath('./fhir:when')))
-
32
set_model_data(model, 'detail', entry.xpath('./fhir:detail').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
16
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module OrderResponse
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
8
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
8
set_model_data(model, 'request', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:request')))
-
8
parse_primitive_field(model,entry,'date','date',false)
-
8
set_model_data(model, 'who', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:who')))
-
8
parse_primitive_field(model,entry,'orderStatus','orderStatus',false)
-
8
parse_primitive_field(model,entry,'description','description',false)
-
16
set_model_data(model, 'fulfillment', entry.xpath('./fhir:fulfillment').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Organization
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_OrganizationContactComponent(entry)
-
64
return nil unless entry
-
64
model = FHIR::Organization::OrganizationContactComponent.new
-
64
self.parse_element_data(model, entry)
-
64
set_model_data(model, 'purpose', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:purpose')))
-
64
set_model_data(model, 'name', FHIR::HumanName.parse_xml_entry(entry.at_xpath('./fhir:name')))
-
144
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
64
set_model_data(model, 'address', FHIR::Address.parse_xml_entry(entry.at_xpath('./fhir:address')))
-
64
model
-
end
-
-
1
def parse_xml_entry(entry)
-
144
return nil unless entry
-
144
model = self.new
-
144
self.parse_element_data(model, entry)
-
144
self.parse_resource_data(model, entry)
-
232
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
144
parse_primitive_field(model,entry,'active','active',false)
-
144
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
144
parse_primitive_field(model,entry,'name','name',false)
-
328
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
264
set_model_data(model, 'address', entry.xpath('./fhir:address').map {|e| FHIR::Address.parse_xml_entry(e)})
-
144
set_model_data(model, 'partOf', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:partOf')))
-
208
set_model_data(model, 'contact', entry.xpath('./fhir:contact').map {|e| parse_xml_entry_OrganizationContactComponent(e)})
-
144
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Patient
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ContactComponent(entry)
-
48
return nil unless entry
-
48
model = FHIR::Patient::ContactComponent.new
-
48
self.parse_element_data(model, entry)
-
96
set_model_data(model, 'relationship', entry.xpath('./fhir:relationship').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
48
set_model_data(model, 'name', FHIR::HumanName.parse_xml_entry(entry.at_xpath('./fhir:name')))
-
88
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
48
set_model_data(model, 'address', FHIR::Address.parse_xml_entry(entry.at_xpath('./fhir:address')))
-
48
parse_primitive_field(model,entry,'gender','gender',false)
-
48
set_model_data(model, 'organization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:organization')))
-
48
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
48
model
-
end
-
-
1
def parse_xml_entry_AnimalComponent(entry)
-
2064
return nil unless entry
-
8
model = FHIR::Patient::AnimalComponent.new
-
8
self.parse_element_data(model, entry)
-
8
set_model_data(model, 'species', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:species')))
-
8
set_model_data(model, 'breed', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:breed')))
-
8
set_model_data(model, 'genderStatus', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:genderStatus')))
-
8
model
-
end
-
-
1
def parse_xml_entry_PatientCommunicationComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::Patient::PatientCommunicationComponent.new
-
16
self.parse_element_data(model, entry)
-
16
set_model_data(model, 'language', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:language')))
-
16
parse_primitive_field(model,entry,'preferred','preferred',false)
-
16
model
-
end
-
-
1
def parse_xml_entry_PatientLinkComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::Patient::PatientLinkComponent.new
-
16
self.parse_element_data(model, entry)
-
16
set_model_data(model, 'other', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:other')))
-
16
parse_primitive_field(model,entry,'type','fhirType',false)
-
16
model
-
end
-
-
1
def parse_xml_entry(entry)
-
2064
return nil unless entry
-
2064
model = self.new
-
2064
self.parse_element_data(model, entry)
-
2064
self.parse_resource_data(model, entry)
-
4128
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
2064
parse_primitive_field(model,entry,'active','active',false)
-
4120
set_model_data(model, 'name', entry.xpath('./fhir:name').map {|e| FHIR::HumanName.parse_xml_entry(e)})
-
2264
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
2064
parse_primitive_field(model,entry,'gender','gender',false)
-
2064
parse_primitive_field(model,entry,'birthDate','birthDate',false)
-
2064
parse_primitive_field(model,entry,'deceasedBoolean','deceasedBoolean',false)
-
2064
parse_primitive_field(model,entry,'deceasedDateTime','deceasedDateTime',false)
-
2232
set_model_data(model, 'address', entry.xpath('./fhir:address').map {|e| FHIR::Address.parse_xml_entry(e)})
-
2064
set_model_data(model, 'maritalStatus', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:maritalStatus')))
-
2064
parse_primitive_field(model,entry,'multipleBirthBoolean','multipleBirthBoolean',false)
-
2064
parse_primitive_field(model,entry,'multipleBirthInteger','multipleBirthInteger',false)
-
2088
set_model_data(model, 'photo', entry.xpath('./fhir:photo').map {|e| FHIR::Attachment.parse_xml_entry(e)})
-
2112
set_model_data(model, 'contact', entry.xpath('./fhir:contact').map {|e| parse_xml_entry_ContactComponent(e)})
-
2064
set_model_data(model, 'animal', parse_xml_entry_AnimalComponent(entry.at_xpath('./fhir:animal')))
-
2080
set_model_data(model, 'communication', entry.xpath('./fhir:communication').map {|e| parse_xml_entry_PatientCommunicationComponent(e)})
-
2072
set_model_data(model, 'careProvider', entry.xpath('./fhir:careProvider').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
2064
set_model_data(model, 'managingOrganization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:managingOrganization')))
-
2080
set_model_data(model, 'link', entry.xpath('./fhir:link').map {|e| parse_xml_entry_PatientLinkComponent(e)})
-
2064
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module PaymentNotice
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
8
set_model_data(model, 'ruleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:ruleset')))
-
8
set_model_data(model, 'originalRuleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:originalRuleset')))
-
8
parse_primitive_field(model,entry,'created','created',false)
-
8
set_model_data(model, 'target', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:target')))
-
8
set_model_data(model, 'provider', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:provider')))
-
8
set_model_data(model, 'organization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:organization')))
-
8
set_model_data(model, 'request', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:request')))
-
8
set_model_data(model, 'response', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:response')))
-
8
set_model_data(model, 'paymentStatus', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:paymentStatus')))
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module PaymentReconciliation
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_DetailsComponent(entry)
-
24
return nil unless entry
-
24
model = FHIR::PaymentReconciliation::DetailsComponent.new
-
24
self.parse_element_data(model, entry)
-
24
set_model_data(model, 'fhirType', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
24
set_model_data(model, 'request', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:request')))
-
24
set_model_data(model, 'responce', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:responce')))
-
24
set_model_data(model, 'submitter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:submitter')))
-
24
set_model_data(model, 'payee', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:payee')))
-
24
parse_primitive_field(model,entry,'date','date',false)
-
24
set_model_data(model, 'amount', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:amount')))
-
24
model
-
end
-
-
1
def parse_xml_entry_NotesComponent(entry)
-
return nil unless entry
-
model = FHIR::PaymentReconciliation::NotesComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'fhirType', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
parse_primitive_field(model,entry,'text','text',false)
-
model
-
end
-
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
8
set_model_data(model, 'request', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:request')))
-
8
parse_primitive_field(model,entry,'outcome','outcome',false)
-
8
parse_primitive_field(model,entry,'disposition','disposition',false)
-
8
set_model_data(model, 'ruleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:ruleset')))
-
8
set_model_data(model, 'originalRuleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:originalRuleset')))
-
8
parse_primitive_field(model,entry,'created','created',false)
-
8
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
8
set_model_data(model, 'organization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:organization')))
-
8
set_model_data(model, 'requestProvider', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:requestProvider')))
-
8
set_model_data(model, 'requestOrganization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:requestOrganization')))
-
32
set_model_data(model, 'detail', entry.xpath('./fhir:detail').map {|e| parse_xml_entry_DetailsComponent(e)})
-
8
set_model_data(model, 'form', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:form')))
-
8
set_model_data(model, 'total', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:total')))
-
8
set_model_data(model, 'note', entry.xpath('./fhir:note').map {|e| parse_xml_entry_NotesComponent(e)})
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Period
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
28224
return nil unless entry
-
833
model = self.new
-
833
self.parse_element_data(model, entry)
-
833
parse_primitive_field(model,entry,'start','start',false)
-
833
parse_primitive_field(model,entry,'end','end',false)
-
833
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Person
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_PersonLinkComponent(entry)
-
return nil unless entry
-
model = FHIR::Person::PersonLinkComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'target', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:target')))
-
parse_primitive_field(model,entry,'assurance','assurance',false)
-
model
-
end
-
-
1
def parse_xml_entry(entry)
-
return nil unless entry
-
model = self.new
-
self.parse_element_data(model, entry)
-
self.parse_resource_data(model, entry)
-
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
set_model_data(model, 'name', entry.xpath('./fhir:name').map {|e| FHIR::HumanName.parse_xml_entry(e)})
-
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
parse_primitive_field(model,entry,'gender','gender',false)
-
parse_primitive_field(model,entry,'birthDate','birthDate',false)
-
set_model_data(model, 'address', entry.xpath('./fhir:address').map {|e| FHIR::Address.parse_xml_entry(e)})
-
set_model_data(model, 'photo', FHIR::Attachment.parse_xml_entry(entry.at_xpath('./fhir:photo')))
-
set_model_data(model, 'managingOrganization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:managingOrganization')))
-
parse_primitive_field(model,entry,'active','active',false)
-
set_model_data(model, 'link', entry.xpath('./fhir:link').map {|e| parse_xml_entry_PersonLinkComponent(e)})
-
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Practitioner
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_PractitionerPractitionerRoleComponent(entry)
-
664
return nil unless entry
-
664
model = FHIR::Practitioner::PractitionerPractitionerRoleComponent.new
-
664
self.parse_element_data(model, entry)
-
664
set_model_data(model, 'managingOrganization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:managingOrganization')))
-
664
set_model_data(model, 'role', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:role')))
-
824
set_model_data(model, 'specialty', entry.xpath('./fhir:specialty').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
664
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
672
set_model_data(model, 'location', entry.xpath('./fhir:location').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
672
set_model_data(model, 'healthcareService', entry.xpath('./fhir:healthcareService').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
664
model
-
end
-
-
1
def parse_xml_entry_PractitionerQualificationComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::Practitioner::PractitionerQualificationComponent.new
-
16
self.parse_element_data(model, entry)
-
24
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
16
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
16
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
16
set_model_data(model, 'issuer', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:issuer')))
-
16
model
-
end
-
-
1
def parse_xml_entry(entry)
-
680
return nil unless entry
-
680
model = self.new
-
680
self.parse_element_data(model, entry)
-
680
self.parse_resource_data(model, entry)
-
1368
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
680
parse_primitive_field(model,entry,'active','active',false)
-
680
set_model_data(model, 'name', FHIR::HumanName.parse_xml_entry(entry.at_xpath('./fhir:name')))
-
1392
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
1240
set_model_data(model, 'address', entry.xpath('./fhir:address').map {|e| FHIR::Address.parse_xml_entry(e)})
-
680
parse_primitive_field(model,entry,'gender','gender',false)
-
680
parse_primitive_field(model,entry,'birthDate','birthDate',false)
-
688
set_model_data(model, 'photo', entry.xpath('./fhir:photo').map {|e| FHIR::Attachment.parse_xml_entry(e)})
-
1344
set_model_data(model, 'practitionerRole', entry.xpath('./fhir:practitionerRole').map {|e| parse_xml_entry_PractitionerPractitionerRoleComponent(e)})
-
696
set_model_data(model, 'qualification', entry.xpath('./fhir:qualification').map {|e| parse_xml_entry_PractitionerQualificationComponent(e)})
-
704
set_model_data(model, 'communication', entry.xpath('./fhir:communication').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
680
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Procedure
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ProcedurePerformerComponent(entry)
-
72
return nil unless entry
-
72
model = FHIR::Procedure::ProcedurePerformerComponent.new
-
72
self.parse_element_data(model, entry)
-
72
set_model_data(model, 'actor', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:actor')))
-
72
set_model_data(model, 'role', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:role')))
-
72
model
-
end
-
-
1
def parse_xml_entry_ProcedureFocalDeviceComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::Procedure::ProcedureFocalDeviceComponent.new
-
8
self.parse_element_data(model, entry)
-
8
set_model_data(model, 'action', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:action')))
-
8
set_model_data(model, 'manipulated', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:manipulated')))
-
8
model
-
end
-
-
1
def parse_xml_entry(entry)
-
72
return nil unless entry
-
72
model = self.new
-
72
self.parse_element_data(model, entry)
-
72
self.parse_resource_data(model, entry)
-
72
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
72
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
72
parse_primitive_field(model,entry,'status','status',false)
-
72
set_model_data(model, 'category', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:category')))
-
72
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
72
parse_primitive_field(model,entry,'notPerformed','notPerformed',false)
-
72
set_model_data(model, 'reasonNotPerformed', entry.xpath('./fhir:reasonNotPerformed').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
128
set_model_data(model, 'bodySite', entry.xpath('./fhir:bodySite').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
72
set_model_data(model, 'reasonCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:reasonCodeableConcept')))
-
72
set_model_data(model, 'reasonReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:reasonReference')))
-
144
set_model_data(model, 'performer', entry.xpath('./fhir:performer').map {|e| parse_xml_entry_ProcedurePerformerComponent(e)})
-
72
parse_primitive_field(model,entry,'performedDateTime','performedDateTime',false)
-
72
set_model_data(model, 'performedPeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:performedPeriod')))
-
72
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
72
set_model_data(model, 'location', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:location')))
-
72
set_model_data(model, 'outcome', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:outcome')))
-
104
set_model_data(model, 'report', entry.xpath('./fhir:report').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
72
set_model_data(model, 'complication', entry.xpath('./fhir:complication').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
128
set_model_data(model, 'followUp', entry.xpath('./fhir:followUp').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
72
set_model_data(model, 'request', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:request')))
-
104
set_model_data(model, 'notes', entry.xpath('./fhir:notes').map {|e| FHIR::Annotation.parse_xml_entry(e)})
-
80
set_model_data(model, 'focalDevice', entry.xpath('./fhir:focalDevice').map {|e| parse_xml_entry_ProcedureFocalDeviceComponent(e)})
-
72
set_model_data(model, 'used', entry.xpath('./fhir:used').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
72
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module ProcedureRequest
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
32
return nil unless entry
-
32
model = self.new
-
32
self.parse_element_data(model, entry)
-
32
self.parse_resource_data(model, entry)
-
32
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
32
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
32
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
40
set_model_data(model, 'bodySite', entry.xpath('./fhir:bodySite').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
32
set_model_data(model, 'reasonCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:reasonCodeableConcept')))
-
32
set_model_data(model, 'reasonReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:reasonReference')))
-
32
parse_primitive_field(model,entry,'scheduledDateTime','scheduledDateTime',false)
-
32
set_model_data(model, 'scheduledPeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:scheduledPeriod')))
-
32
set_model_data(model, 'scheduledTiming', FHIR::Timing.parse_xml_entry(entry.at_xpath('./fhir:scheduledTiming')))
-
32
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
32
set_model_data(model, 'performer', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:performer')))
-
32
parse_primitive_field(model,entry,'status','status',false)
-
32
set_model_data(model, 'notes', entry.xpath('./fhir:notes').map {|e| FHIR::Annotation.parse_xml_entry(e)})
-
32
parse_primitive_field(model,entry,'asNeededBoolean','asNeededBoolean',false)
-
32
set_model_data(model, 'asNeededCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:asNeededCodeableConcept')))
-
32
parse_primitive_field(model,entry,'orderedOn','orderedOn',false)
-
32
set_model_data(model, 'orderer', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:orderer')))
-
32
parse_primitive_field(model,entry,'priority','priority',false)
-
32
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module ProcessRequest
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ItemsComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::ProcessRequest::ItemsComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'sequenceLinkId','sequenceLinkId',false)
-
8
model
-
end
-
-
1
def parse_xml_entry(entry)
-
72
return nil unless entry
-
72
model = self.new
-
72
self.parse_element_data(model, entry)
-
72
self.parse_resource_data(model, entry)
-
72
parse_primitive_field(model,entry,'action','action',false)
-
144
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
72
set_model_data(model, 'ruleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:ruleset')))
-
72
set_model_data(model, 'originalRuleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:originalRuleset')))
-
72
parse_primitive_field(model,entry,'created','created',false)
-
72
set_model_data(model, 'target', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:target')))
-
72
set_model_data(model, 'provider', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:provider')))
-
72
set_model_data(model, 'organization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:organization')))
-
72
set_model_data(model, 'request', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:request')))
-
72
set_model_data(model, 'response', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:response')))
-
72
parse_primitive_field(model,entry,'nullify','nullify',false)
-
72
parse_primitive_field(model,entry,'reference','reference',false)
-
80
set_model_data(model, 'item', entry.xpath('./fhir:item').map {|e| parse_xml_entry_ItemsComponent(e)})
-
72
parse_primitive_field(model,entry,'include','include',true)
-
72
parse_primitive_field(model,entry,'exclude','exclude',true)
-
72
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
72
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module ProcessResponse
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ProcessResponseNotesComponent(entry)
-
return nil unless entry
-
model = FHIR::ProcessResponse::ProcessResponseNotesComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'fhirType', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
parse_primitive_field(model,entry,'text','text',false)
-
model
-
end
-
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
8
set_model_data(model, 'request', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:request')))
-
8
set_model_data(model, 'outcome', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:outcome')))
-
8
parse_primitive_field(model,entry,'disposition','disposition',false)
-
8
set_model_data(model, 'ruleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:ruleset')))
-
8
set_model_data(model, 'originalRuleset', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:originalRuleset')))
-
8
parse_primitive_field(model,entry,'created','created',false)
-
8
set_model_data(model, 'organization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:organization')))
-
8
set_model_data(model, 'requestProvider', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:requestProvider')))
-
8
set_model_data(model, 'requestOrganization', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:requestOrganization')))
-
8
set_model_data(model, 'form', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:form')))
-
8
set_model_data(model, 'notes', entry.xpath('./fhir:notes').map {|e| parse_xml_entry_ProcessResponseNotesComponent(e)})
-
8
set_model_data(model, 'error', entry.xpath('./fhir:error').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Provenance
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ProvenanceAgentRelatedAgentComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::Provenance::ProvenanceAgentRelatedAgentComponent.new
-
8
self.parse_element_data(model, entry)
-
8
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
8
parse_primitive_field(model,entry,'target','target',false)
-
8
model
-
end
-
-
1
def parse_xml_entry_ProvenanceAgentComponent(entry)
-
32
return nil unless entry
-
24
model = FHIR::Provenance::ProvenanceAgentComponent.new
-
24
self.parse_element_data(model, entry)
-
24
set_model_data(model, 'role', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:role')))
-
24
set_model_data(model, 'actor', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:actor')))
-
24
set_model_data(model, 'userId', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:userId')))
-
32
set_model_data(model, 'relatedAgent', entry.xpath('./fhir:relatedAgent').map {|e| parse_xml_entry_ProvenanceAgentRelatedAgentComponent(e)})
-
24
model
-
end
-
-
1
def parse_xml_entry_ProvenanceEntityComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::Provenance::ProvenanceEntityComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'role','role',false)
-
8
set_model_data(model, 'fhirType', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
8
parse_primitive_field(model,entry,'reference','reference',false)
-
8
parse_primitive_field(model,entry,'display','display',false)
-
8
set_model_data(model, 'agent', parse_xml_entry_ProvenanceAgentComponent(entry.at_xpath('./fhir:agent')))
-
8
model
-
end
-
-
1
def parse_xml_entry(entry)
-
16
return nil unless entry
-
16
model = self.new
-
16
self.parse_element_data(model, entry)
-
16
self.parse_resource_data(model, entry)
-
32
set_model_data(model, 'target', entry.xpath('./fhir:target').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
16
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
16
parse_primitive_field(model,entry,'recorded','recorded',false)
-
32
set_model_data(model, 'reason', entry.xpath('./fhir:reason').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
16
set_model_data(model, 'activity', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:activity')))
-
16
set_model_data(model, 'location', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:location')))
-
16
parse_primitive_field(model,entry,'policy','policy',true)
-
40
set_model_data(model, 'agent', entry.xpath('./fhir:agent').map {|e| parse_xml_entry_ProvenanceAgentComponent(e)})
-
24
set_model_data(model, 'entity', entry.xpath('./fhir:entity').map {|e| parse_xml_entry_ProvenanceEntityComponent(e)})
-
24
set_model_data(model, 'signature', entry.xpath('./fhir:signature').map {|e| FHIR::Signature.parse_xml_entry(e)})
-
16
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Quantity
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
15630
return nil unless entry
-
11742
model = self.new
-
11742
self.parse_element_data(model, entry)
-
11742
parse_primitive_field(model,entry,'value','value',false)
-
11742
parse_primitive_field(model,entry,'comparator','comparator',false)
-
11742
parse_primitive_field(model,entry,'unit','unit',false)
-
11742
parse_primitive_field(model,entry,'system','system',false)
-
11742
parse_primitive_field(model,entry,'code','code',false)
-
11742
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Questionnaire
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_QuestionComponent(entry)
-
1928
return nil unless entry
-
1928
model = FHIR::Questionnaire::QuestionComponent.new
-
1928
self.parse_element_data(model, entry)
-
1928
parse_primitive_field(model,entry,'linkId','linkId',false)
-
2304
set_model_data(model, 'concept', entry.xpath('./fhir:concept').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
1928
parse_primitive_field(model,entry,'text','text',false)
-
1928
parse_primitive_field(model,entry,'type','fhirType',false)
-
1928
parse_primitive_field(model,entry,'required','required',false)
-
1928
parse_primitive_field(model,entry,'repeats','repeats',false)
-
1928
set_model_data(model, 'options', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:options')))
-
2088
set_model_data(model, 'option', entry.xpath('./fhir:option').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
2416
set_model_data(model, 'group', entry.xpath('./fhir:group').map {|e| parse_xml_entry_GroupComponent(e)})
-
1928
model
-
end
-
-
1
def parse_xml_entry_GroupComponent(entry)
-
1016
return nil unless entry
-
1016
model = FHIR::Questionnaire::GroupComponent.new
-
1016
self.parse_element_data(model, entry)
-
1016
parse_primitive_field(model,entry,'linkId','linkId',false)
-
1016
parse_primitive_field(model,entry,'title','title',false)
-
1120
set_model_data(model, 'concept', entry.xpath('./fhir:concept').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
1016
parse_primitive_field(model,entry,'text','text',false)
-
1016
parse_primitive_field(model,entry,'required','required',false)
-
1016
parse_primitive_field(model,entry,'repeats','repeats',false)
-
1440
set_model_data(model, 'group', entry.xpath('./fhir:group').map {|e| parse_xml_entry_GroupComponent(e)})
-
2944
set_model_data(model, 'question', entry.xpath('./fhir:question').map {|e| parse_xml_entry_QuestionComponent(e)})
-
1016
model
-
end
-
-
1
def parse_xml_entry(entry)
-
104
return nil unless entry
-
104
model = self.new
-
104
self.parse_element_data(model, entry)
-
104
self.parse_resource_data(model, entry)
-
160
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
104
parse_primitive_field(model,entry,'version','versionNum',false)
-
104
parse_primitive_field(model,entry,'status','status',false)
-
104
parse_primitive_field(model,entry,'date','date',false)
-
104
parse_primitive_field(model,entry,'publisher','publisher',false)
-
104
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
104
parse_primitive_field(model,entry,'subjectType','subjectType',true)
-
104
set_model_data(model, 'group', parse_xml_entry_GroupComponent(entry.at_xpath('./fhir:group')))
-
104
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module QuestionnaireResponse
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_QuestionAnswerComponent(entry)
-
1488
return nil unless entry
-
1488
model = FHIR::QuestionnaireResponse::QuestionAnswerComponent.new
-
1488
self.parse_element_data(model, entry)
-
1488
parse_primitive_field(model,entry,'valueBoolean','valueBoolean',false)
-
1488
parse_primitive_field(model,entry,'valueDecimal','valueDecimal',false)
-
1488
parse_primitive_field(model,entry,'valueInteger','valueInteger',false)
-
1488
parse_primitive_field(model,entry,'valueDate','valueDate',false)
-
1488
parse_primitive_field(model,entry,'valueDateTime','valueDateTime',false)
-
1488
parse_primitive_field(model,entry,'valueInstant','valueInstant',false)
-
1488
parse_primitive_field(model,entry,'valueTime','valueTime',false)
-
1488
parse_primitive_field(model,entry,'valueString','valueString',false)
-
1488
parse_primitive_field(model,entry,'valueUri','valueUri',false)
-
1488
set_model_data(model, 'valueAttachment', FHIR::Attachment.parse_xml_entry(entry.at_xpath('./fhir:valueAttachment')))
-
1488
set_model_data(model, 'valueCoding', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:valueCoding')))
-
1488
set_model_data(model, 'valueQuantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:valueQuantity')))
-
1488
set_model_data(model, 'valueReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:valueReference')))
-
1672
set_model_data(model, 'group', entry.xpath('./fhir:group').map {|e| parse_xml_entry_GroupComponent(e)})
-
1488
model
-
end
-
-
1
def parse_xml_entry_QuestionComponent(entry)
-
1488
return nil unless entry
-
1488
model = FHIR::QuestionnaireResponse::QuestionComponent.new
-
1488
self.parse_element_data(model, entry)
-
1488
parse_primitive_field(model,entry,'linkId','linkId',false)
-
1488
parse_primitive_field(model,entry,'text','text',false)
-
2976
set_model_data(model, 'answer', entry.xpath('./fhir:answer').map {|e| parse_xml_entry_QuestionAnswerComponent(e)})
-
1488
model
-
end
-
-
1
def parse_xml_entry_GroupComponent(entry)
-
680
return nil unless entry
-
680
model = FHIR::QuestionnaireResponse::GroupComponent.new
-
680
self.parse_element_data(model, entry)
-
680
parse_primitive_field(model,entry,'linkId','linkId',false)
-
680
parse_primitive_field(model,entry,'title','title',false)
-
680
parse_primitive_field(model,entry,'text','text',false)
-
680
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
1128
set_model_data(model, 'group', entry.xpath('./fhir:group').map {|e| parse_xml_entry_GroupComponent(e)})
-
2168
set_model_data(model, 'question', entry.xpath('./fhir:question').map {|e| parse_xml_entry_QuestionComponent(e)})
-
680
model
-
end
-
-
1
def parse_xml_entry(entry)
-
48
return nil unless entry
-
48
model = self.new
-
48
self.parse_element_data(model, entry)
-
48
self.parse_resource_data(model, entry)
-
48
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
48
set_model_data(model, 'questionnaire', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:questionnaire')))
-
48
parse_primitive_field(model,entry,'status','status',false)
-
48
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
48
set_model_data(model, 'author', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:author')))
-
48
parse_primitive_field(model,entry,'authored','authored',false)
-
48
set_model_data(model, 'source', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:source')))
-
48
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
48
set_model_data(model, 'group', parse_xml_entry_GroupComponent(entry.at_xpath('./fhir:group')))
-
48
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Range
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
9120
return nil unless entry
-
120
model = self.new
-
120
self.parse_element_data(model, entry)
-
120
set_model_data(model, 'low', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:low')))
-
120
set_model_data(model, 'high', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:high')))
-
120
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Ratio
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
4400
return nil unless entry
-
96
model = self.new
-
96
self.parse_element_data(model, entry)
-
96
set_model_data(model, 'numerator', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:numerator')))
-
96
set_model_data(model, 'denominator', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:denominator')))
-
96
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Reference
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
67600
return nil unless entry
-
33361
model = self.new
-
33361
self.parse_element_data(model, entry)
-
33361
parse_primitive_field(model,entry,'reference','reference',false)
-
33361
parse_primitive_field(model,entry,'display','display',false)
-
33361
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module ReferralRequest
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
24
return nil unless entry
-
24
model = self.new
-
24
self.parse_element_data(model, entry)
-
24
self.parse_resource_data(model, entry)
-
24
parse_primitive_field(model,entry,'status','status',false)
-
32
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
24
parse_primitive_field(model,entry,'date','date',false)
-
24
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
24
set_model_data(model, 'specialty', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:specialty')))
-
24
set_model_data(model, 'priority', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:priority')))
-
24
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
24
set_model_data(model, 'requester', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:requester')))
-
40
set_model_data(model, 'recipient', entry.xpath('./fhir:recipient').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
24
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
24
parse_primitive_field(model,entry,'dateSent','dateSent',false)
-
24
set_model_data(model, 'reason', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:reason')))
-
24
parse_primitive_field(model,entry,'description','description',false)
-
48
set_model_data(model, 'serviceRequested', entry.xpath('./fhir:serviceRequested').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
24
set_model_data(model, 'supportingInformation', entry.xpath('./fhir:supportingInformation').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
24
set_model_data(model, 'fulfillmentTime', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:fulfillmentTime')))
-
24
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module RelatedPerson
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
32
return nil unless entry
-
32
model = self.new
-
32
self.parse_element_data(model, entry)
-
32
self.parse_resource_data(model, entry)
-
48
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
32
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
32
set_model_data(model, 'relationship', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:relationship')))
-
32
set_model_data(model, 'name', FHIR::HumanName.parse_xml_entry(entry.at_xpath('./fhir:name')))
-
72
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
32
parse_primitive_field(model,entry,'gender','gender',false)
-
32
parse_primitive_field(model,entry,'birthDate','birthDate',false)
-
48
set_model_data(model, 'address', entry.xpath('./fhir:address').map {|e| FHIR::Address.parse_xml_entry(e)})
-
56
set_model_data(model, 'photo', entry.xpath('./fhir:photo').map {|e| FHIR::Attachment.parse_xml_entry(e)})
-
32
set_model_data(model, 'period', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:period')))
-
32
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module RiskAssessment
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_RiskAssessmentPredictionComponent(entry)
-
80
return nil unless entry
-
80
model = FHIR::RiskAssessment::RiskAssessmentPredictionComponent.new
-
80
self.parse_element_data(model, entry)
-
80
set_model_data(model, 'outcome', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:outcome')))
-
80
parse_primitive_field(model,entry,'probabilityDecimal','probabilityDecimal',false)
-
80
set_model_data(model, 'probabilityRange', FHIR::Range.parse_xml_entry(entry.at_xpath('./fhir:probabilityRange')))
-
80
set_model_data(model, 'probabilityCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:probabilityCodeableConcept')))
-
80
parse_primitive_field(model,entry,'relativeRisk','relativeRisk',false)
-
80
set_model_data(model, 'whenPeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:whenPeriod')))
-
80
set_model_data(model, 'whenRange', FHIR::Range.parse_xml_entry(entry.at_xpath('./fhir:whenRange')))
-
80
parse_primitive_field(model,entry,'rationale','rationale',false)
-
80
model
-
end
-
-
1
def parse_xml_entry(entry)
-
32
return nil unless entry
-
32
model = self.new
-
32
self.parse_element_data(model, entry)
-
32
self.parse_resource_data(model, entry)
-
32
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
32
parse_primitive_field(model,entry,'date','date',false)
-
32
set_model_data(model, 'condition', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:condition')))
-
32
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
32
set_model_data(model, 'performer', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:performer')))
-
32
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
32
set_model_data(model, 'method', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:method')))
-
64
set_model_data(model, 'basis', entry.xpath('./fhir:basis').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
112
set_model_data(model, 'prediction', entry.xpath('./fhir:prediction').map {|e| parse_xml_entry_RiskAssessmentPredictionComponent(e)})
-
32
parse_primitive_field(model,entry,'mitigation','mitigation',false)
-
32
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module SampledData
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
4064
return nil unless entry
-
24
model = self.new
-
24
self.parse_element_data(model, entry)
-
24
set_model_data(model, 'origin', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:origin')))
-
24
parse_primitive_field(model,entry,'period','period',false)
-
24
parse_primitive_field(model,entry,'factor','factor',false)
-
24
parse_primitive_field(model,entry,'lowerLimit','lowerLimit',false)
-
24
parse_primitive_field(model,entry,'upperLimit','upperLimit',false)
-
24
parse_primitive_field(model,entry,'dimensions','dimensions',false)
-
24
parse_primitive_field(model,entry,'data','data',false)
-
24
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Schedule
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
16
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
16
set_model_data(model, 'fhirType', entry.xpath('./fhir:type').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
8
set_model_data(model, 'actor', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:actor')))
-
8
set_model_data(model, 'planningHorizon', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:planningHorizon')))
-
8
parse_primitive_field(model,entry,'comment','comment',false)
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module SearchParameter
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_SearchParameterContactComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::SearchParameter::SearchParameterContactComponent.new
-
16
self.parse_element_data(model, entry)
-
16
parse_primitive_field(model,entry,'name','name',false)
-
32
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
16
model
-
end
-
-
1
def parse_xml_entry(entry)
-
16
return nil unless entry
-
16
model = self.new
-
16
self.parse_element_data(model, entry)
-
16
self.parse_resource_data(model, entry)
-
16
parse_primitive_field(model,entry,'url','url',false)
-
16
parse_primitive_field(model,entry,'name','name',false)
-
16
parse_primitive_field(model,entry,'status','status',false)
-
16
parse_primitive_field(model,entry,'experimental','experimental',false)
-
16
parse_primitive_field(model,entry,'publisher','publisher',false)
-
32
set_model_data(model, 'contact', entry.xpath('./fhir:contact').map {|e| parse_xml_entry_SearchParameterContactComponent(e)})
-
16
parse_primitive_field(model,entry,'date','date',false)
-
16
parse_primitive_field(model,entry,'requirements','requirements',false)
-
16
parse_primitive_field(model,entry,'code','code',false)
-
16
parse_primitive_field(model,entry,'base','base',false)
-
16
parse_primitive_field(model,entry,'type','fhirType',false)
-
16
parse_primitive_field(model,entry,'description','description',false)
-
16
parse_primitive_field(model,entry,'xpath','xpath',false)
-
16
parse_primitive_field(model,entry,'xpathUsage','xpathUsage',false)
-
16
parse_primitive_field(model,entry,'target','target',true)
-
16
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Signature
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
95
return nil unless entry
-
16
model = self.new
-
16
self.parse_element_data(model, entry)
-
32
set_model_data(model, 'fhirType', entry.xpath('./fhir:type').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
16
parse_primitive_field(model,entry,'when','when',false)
-
16
parse_primitive_field(model,entry,'whoUri','whoUri',false)
-
16
set_model_data(model, 'whoReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:whoReference')))
-
16
parse_primitive_field(model,entry,'contentType','contentType',false)
-
16
parse_primitive_field(model,entry,'blob','blob',false)
-
16
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Slot
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
32
return nil unless entry
-
32
model = self.new
-
32
self.parse_element_data(model, entry)
-
32
self.parse_resource_data(model, entry)
-
40
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
32
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
32
set_model_data(model, 'schedule', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:schedule')))
-
32
parse_primitive_field(model,entry,'freeBusyType','freeBusyType',false)
-
32
parse_primitive_field(model,entry,'start','start',false)
-
32
parse_primitive_field(model,entry,'end','end',false)
-
32
parse_primitive_field(model,entry,'overbooked','overbooked',false)
-
32
parse_primitive_field(model,entry,'comment','comment',false)
-
32
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Specimen
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_SpecimenCollectionComponent(entry)
-
88
return nil unless entry
-
88
model = FHIR::Specimen::SpecimenCollectionComponent.new
-
88
self.parse_element_data(model, entry)
-
88
set_model_data(model, 'collector', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:collector')))
-
88
parse_primitive_field(model,entry,'comment','comment',true)
-
88
parse_primitive_field(model,entry,'collectedDateTime','collectedDateTime',false)
-
88
set_model_data(model, 'collectedPeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:collectedPeriod')))
-
88
set_model_data(model, 'quantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:quantity')))
-
88
set_model_data(model, 'method', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:method')))
-
88
set_model_data(model, 'bodySite', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:bodySite')))
-
88
model
-
end
-
-
1
def parse_xml_entry_SpecimenTreatmentComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::Specimen::SpecimenTreatmentComponent.new
-
16
self.parse_element_data(model, entry)
-
16
parse_primitive_field(model,entry,'description','description',false)
-
16
set_model_data(model, 'procedure', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:procedure')))
-
24
set_model_data(model, 'additive', entry.xpath('./fhir:additive').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
16
model
-
end
-
-
1
def parse_xml_entry_SpecimenContainerComponent(entry)
-
56
return nil unless entry
-
56
model = FHIR::Specimen::SpecimenContainerComponent.new
-
56
self.parse_element_data(model, entry)
-
64
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
56
parse_primitive_field(model,entry,'description','description',false)
-
56
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
56
set_model_data(model, 'capacity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:capacity')))
-
56
set_model_data(model, 'specimenQuantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:specimenQuantity')))
-
56
set_model_data(model, 'additiveCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:additiveCodeableConcept')))
-
56
set_model_data(model, 'additiveReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:additiveReference')))
-
56
model
-
end
-
-
1
def parse_xml_entry(entry)
-
88
return nil unless entry
-
88
model = self.new
-
88
self.parse_element_data(model, entry)
-
88
self.parse_resource_data(model, entry)
-
112
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
88
parse_primitive_field(model,entry,'status','status',false)
-
88
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
96
set_model_data(model, 'parent', entry.xpath('./fhir:parent').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
88
set_model_data(model, 'subject', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:subject')))
-
88
set_model_data(model, 'accessionIdentifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:accessionIdentifier')))
-
88
parse_primitive_field(model,entry,'receivedTime','receivedTime',false)
-
88
set_model_data(model, 'fhirCollection', parse_xml_entry_SpecimenCollectionComponent(entry.at_xpath('./fhir:collection')))
-
104
set_model_data(model, 'treatment', entry.xpath('./fhir:treatment').map {|e| parse_xml_entry_SpecimenTreatmentComponent(e)})
-
144
set_model_data(model, 'container', entry.xpath('./fhir:container').map {|e| parse_xml_entry_SpecimenContainerComponent(e)})
-
88
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module StructureDefinition
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_StructureDefinitionContactComponent(entry)
-
647
return nil unless entry
-
647
model = FHIR::StructureDefinition::StructureDefinitionContactComponent.new
-
647
self.parse_element_data(model, entry)
-
647
parse_primitive_field(model,entry,'name','name',false)
-
1294
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
647
model
-
end
-
-
1
def parse_xml_entry_StructureDefinitionMappingComponent(entry)
-
523
return nil unless entry
-
523
model = FHIR::StructureDefinition::StructureDefinitionMappingComponent.new
-
523
self.parse_element_data(model, entry)
-
523
parse_primitive_field(model,entry,'identity','fhirIdentity',false)
-
523
parse_primitive_field(model,entry,'uri','uri',false)
-
523
parse_primitive_field(model,entry,'name','name',false)
-
523
parse_primitive_field(model,entry,'comments','comments',false)
-
523
model
-
end
-
-
1
def parse_xml_entry_StructureDefinitionSnapshotComponent(entry)
-
596
return nil unless entry
-
596
model = FHIR::StructureDefinition::StructureDefinitionSnapshotComponent.new
-
596
self.parse_element_data(model, entry)
-
12568
set_model_data(model, 'element', entry.xpath('./fhir:element').map {|e| FHIR::ElementDefinition.parse_xml_entry(e)})
-
596
model
-
end
-
-
1
def parse_xml_entry_StructureDefinitionDifferentialComponent(entry)
-
596
return nil unless entry
-
588
model = FHIR::StructureDefinition::StructureDefinitionDifferentialComponent.new
-
588
self.parse_element_data(model, entry)
-
6973
set_model_data(model, 'element', entry.xpath('./fhir:element').map {|e| FHIR::ElementDefinition.parse_xml_entry(e)})
-
588
model
-
end
-
-
1
def parse_xml_entry(entry)
-
596
return nil unless entry
-
596
model = self.new
-
596
self.parse_element_data(model, entry)
-
596
self.parse_resource_data(model, entry)
-
596
parse_primitive_field(model,entry,'url','url',false)
-
604
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
596
parse_primitive_field(model,entry,'version','versionNum',false)
-
596
parse_primitive_field(model,entry,'name','name',false)
-
596
parse_primitive_field(model,entry,'display','display',false)
-
596
parse_primitive_field(model,entry,'status','status',false)
-
596
parse_primitive_field(model,entry,'experimental','experimental',false)
-
596
parse_primitive_field(model,entry,'publisher','publisher',false)
-
1243
set_model_data(model, 'contact', entry.xpath('./fhir:contact').map {|e| parse_xml_entry_StructureDefinitionContactComponent(e)})
-
596
parse_primitive_field(model,entry,'date','date',false)
-
596
parse_primitive_field(model,entry,'description','description',false)
-
604
set_model_data(model, 'useContext', entry.xpath('./fhir:useContext').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
596
parse_primitive_field(model,entry,'requirements','requirements',false)
-
596
parse_primitive_field(model,entry,'copyright','copyright',false)
-
604
set_model_data(model, 'code', entry.xpath('./fhir:code').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
596
parse_primitive_field(model,entry,'fhirVersion','fhirVersion',false)
-
1119
set_model_data(model, 'mapping', entry.xpath('./fhir:mapping').map {|e| parse_xml_entry_StructureDefinitionMappingComponent(e)})
-
596
parse_primitive_field(model,entry,'kind','kind',false)
-
596
parse_primitive_field(model,entry,'constrainedType','constrainedType',false)
-
596
parse_primitive_field(model,entry,'abstract','abstract',false)
-
596
parse_primitive_field(model,entry,'contextType','contextType',false)
-
596
parse_primitive_field(model,entry,'context','context',true)
-
596
parse_primitive_field(model,entry,'base','base',false)
-
596
set_model_data(model, 'snapshot', parse_xml_entry_StructureDefinitionSnapshotComponent(entry.at_xpath('./fhir:snapshot')))
-
596
set_model_data(model, 'differential', parse_xml_entry_StructureDefinitionDifferentialComponent(entry.at_xpath('./fhir:differential')))
-
596
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Subscription
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_SubscriptionChannelComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::Subscription::SubscriptionChannelComponent.new
-
16
self.parse_element_data(model, entry)
-
16
parse_primitive_field(model,entry,'type','fhirType',false)
-
16
parse_primitive_field(model,entry,'endpoint','endpoint',false)
-
16
parse_primitive_field(model,entry,'payload','payload',false)
-
16
parse_primitive_field(model,entry,'header','header',false)
-
16
model
-
end
-
-
1
def parse_xml_entry(entry)
-
16
return nil unless entry
-
16
model = self.new
-
16
self.parse_element_data(model, entry)
-
16
self.parse_resource_data(model, entry)
-
16
parse_primitive_field(model,entry,'criteria','criteria',false)
-
32
set_model_data(model, 'contact', entry.xpath('./fhir:contact').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
16
parse_primitive_field(model,entry,'reason','reason',false)
-
16
parse_primitive_field(model,entry,'status','status',false)
-
16
parse_primitive_field(model,entry,'error','error',false)
-
16
set_model_data(model, 'channel', parse_xml_entry_SubscriptionChannelComponent(entry.at_xpath('./fhir:channel')))
-
16
parse_primitive_field(model,entry,'end','end',false)
-
32
set_model_data(model, 'tag', entry.xpath('./fhir:tag').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
16
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Substance
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_SubstanceInstanceComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::Substance::SubstanceInstanceComponent.new
-
8
self.parse_element_data(model, entry)
-
8
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
8
parse_primitive_field(model,entry,'expiry','expiry',false)
-
8
set_model_data(model, 'quantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:quantity')))
-
8
model
-
end
-
-
1
def parse_xml_entry_SubstanceIngredientComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::Substance::SubstanceIngredientComponent.new
-
16
self.parse_element_data(model, entry)
-
16
set_model_data(model, 'quantity', FHIR::Ratio.parse_xml_entry(entry.at_xpath('./fhir:quantity')))
-
16
set_model_data(model, 'substance', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:substance')))
-
16
model
-
end
-
-
1
def parse_xml_entry(entry)
-
80
return nil unless entry
-
80
model = self.new
-
80
self.parse_element_data(model, entry)
-
80
self.parse_resource_data(model, entry)
-
104
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
112
set_model_data(model, 'category', entry.xpath('./fhir:category').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
80
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
80
parse_primitive_field(model,entry,'description','description',false)
-
88
set_model_data(model, 'instance', entry.xpath('./fhir:instance').map {|e| parse_xml_entry_SubstanceInstanceComponent(e)})
-
96
set_model_data(model, 'ingredient', entry.xpath('./fhir:ingredient').map {|e| parse_xml_entry_SubstanceIngredientComponent(e)})
-
80
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module SupplyDelivery
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
8
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
8
parse_primitive_field(model,entry,'status','status',false)
-
8
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
8
set_model_data(model, 'fhirType', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
8
set_model_data(model, 'quantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:quantity')))
-
8
set_model_data(model, 'suppliedItem', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:suppliedItem')))
-
8
set_model_data(model, 'supplier', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:supplier')))
-
8
set_model_data(model, 'whenPrepared', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:whenPrepared')))
-
8
parse_primitive_field(model,entry,'time','time',false)
-
8
set_model_data(model, 'destination', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:destination')))
-
8
set_model_data(model, 'receiver', entry.xpath('./fhir:receiver').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module SupplyRequest
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_SupplyRequestWhenComponent(entry)
-
8
return nil unless entry
-
model = FHIR::SupplyRequest::SupplyRequestWhenComponent.new
-
self.parse_element_data(model, entry)
-
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
set_model_data(model, 'schedule', FHIR::Timing.parse_xml_entry(entry.at_xpath('./fhir:schedule')))
-
model
-
end
-
-
1
def parse_xml_entry(entry)
-
8
return nil unless entry
-
8
model = self.new
-
8
self.parse_element_data(model, entry)
-
8
self.parse_resource_data(model, entry)
-
8
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
8
set_model_data(model, 'source', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:source')))
-
8
parse_primitive_field(model,entry,'date','date',false)
-
8
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
8
parse_primitive_field(model,entry,'status','status',false)
-
8
set_model_data(model, 'kind', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:kind')))
-
8
set_model_data(model, 'orderedItem', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:orderedItem')))
-
8
set_model_data(model, 'supplier', entry.xpath('./fhir:supplier').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
8
set_model_data(model, 'reasonCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:reasonCodeableConcept')))
-
8
set_model_data(model, 'reasonReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:reasonReference')))
-
8
set_model_data(model, 'when', parse_xml_entry_SupplyRequestWhenComponent(entry.at_xpath('./fhir:when')))
-
8
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module TestScript
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_TestScriptContactComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::TestScript::TestScriptContactComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'name','name',false)
-
16
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
8
model
-
end
-
-
1
def parse_xml_entry_TestScriptMetadataLinkComponent(entry)
-
8
return nil unless entry
-
8
model = FHIR::TestScript::TestScriptMetadataLinkComponent.new
-
8
self.parse_element_data(model, entry)
-
8
parse_primitive_field(model,entry,'url','url',false)
-
8
parse_primitive_field(model,entry,'description','description',false)
-
8
model
-
end
-
-
1
def parse_xml_entry_TestScriptMetadataCapabilityComponent(entry)
-
48
return nil unless entry
-
48
model = FHIR::TestScript::TestScriptMetadataCapabilityComponent.new
-
48
self.parse_element_data(model, entry)
-
48
parse_primitive_field(model,entry,'required','required',false)
-
48
parse_primitive_field(model,entry,'validated','fhirValidated',false)
-
48
parse_primitive_field(model,entry,'description','description',false)
-
48
parse_primitive_field(model,entry,'destination','destination',false)
-
48
parse_primitive_field(model,entry,'link','link',true)
-
48
set_model_data(model, 'conformance', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:conformance')))
-
48
model
-
end
-
-
1
def parse_xml_entry_TestScriptMetadataComponent(entry)
-
64
return nil unless entry
-
40
model = FHIR::TestScript::TestScriptMetadataComponent.new
-
40
self.parse_element_data(model, entry)
-
48
set_model_data(model, 'link', entry.xpath('./fhir:link').map {|e| parse_xml_entry_TestScriptMetadataLinkComponent(e)})
-
88
set_model_data(model, 'capability', entry.xpath('./fhir:capability').map {|e| parse_xml_entry_TestScriptMetadataCapabilityComponent(e)})
-
40
model
-
end
-
-
1
def parse_xml_entry_TestScriptFixtureComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::TestScript::TestScriptFixtureComponent.new
-
16
self.parse_element_data(model, entry)
-
16
parse_primitive_field(model,entry,'autocreate','autocreate',false)
-
16
parse_primitive_field(model,entry,'autodelete','autodelete',false)
-
16
set_model_data(model, 'resource', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:resource')))
-
16
model
-
end
-
-
1
def parse_xml_entry_TestScriptVariableComponent(entry)
-
return nil unless entry
-
model = FHIR::TestScript::TestScriptVariableComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'name','name',false)
-
parse_primitive_field(model,entry,'headerField','headerField',false)
-
parse_primitive_field(model,entry,'path','path',false)
-
parse_primitive_field(model,entry,'sourceId','sourceId',false)
-
model
-
end
-
-
1
def parse_xml_entry_TestScriptSetupActionOperationRequestHeaderComponent(entry)
-
return nil unless entry
-
model = FHIR::TestScript::TestScriptSetupActionOperationRequestHeaderComponent.new
-
self.parse_element_data(model, entry)
-
parse_primitive_field(model,entry,'field','field',false)
-
parse_primitive_field(model,entry,'value','value',false)
-
model
-
end
-
-
1
def parse_xml_entry_TestScriptSetupActionOperationComponent(entry)
-
296
return nil unless entry
-
80
model = FHIR::TestScript::TestScriptSetupActionOperationComponent.new
-
80
self.parse_element_data(model, entry)
-
80
set_model_data(model, 'fhirType', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:type')))
-
80
parse_primitive_field(model,entry,'resource','resource',false)
-
80
parse_primitive_field(model,entry,'label','label',false)
-
80
parse_primitive_field(model,entry,'description','description',false)
-
80
parse_primitive_field(model,entry,'accept','accept',false)
-
80
parse_primitive_field(model,entry,'contentType','contentType',false)
-
80
parse_primitive_field(model,entry,'destination','destination',false)
-
80
parse_primitive_field(model,entry,'encodeRequestUrl','encodeRequestUrl',false)
-
80
parse_primitive_field(model,entry,'params','params',false)
-
80
set_model_data(model, 'requestHeader', entry.xpath('./fhir:requestHeader').map {|e| parse_xml_entry_TestScriptSetupActionOperationRequestHeaderComponent(e)})
-
80
parse_primitive_field(model,entry,'responseId','responseId',false)
-
80
parse_primitive_field(model,entry,'sourceId','sourceId',false)
-
80
parse_primitive_field(model,entry,'targetId','targetId',false)
-
80
parse_primitive_field(model,entry,'url','url',false)
-
80
model
-
end
-
-
1
def parse_xml_entry_TestScriptSetupActionAssertComponent(entry)
-
280
return nil unless entry
-
216
model = FHIR::TestScript::TestScriptSetupActionAssertComponent.new
-
216
self.parse_element_data(model, entry)
-
216
parse_primitive_field(model,entry,'label','label',false)
-
216
parse_primitive_field(model,entry,'description','description',false)
-
216
parse_primitive_field(model,entry,'direction','direction',false)
-
216
parse_primitive_field(model,entry,'compareToSourceId','compareToSourceId',false)
-
216
parse_primitive_field(model,entry,'compareToSourcePath','compareToSourcePath',false)
-
216
parse_primitive_field(model,entry,'contentType','contentType',false)
-
216
parse_primitive_field(model,entry,'headerField','headerField',false)
-
216
parse_primitive_field(model,entry,'minimumId','minimumId',false)
-
216
parse_primitive_field(model,entry,'navigationLinks','navigationLinks',false)
-
216
parse_primitive_field(model,entry,'operator','operator',false)
-
216
parse_primitive_field(model,entry,'path','path',false)
-
216
parse_primitive_field(model,entry,'resource','resource',false)
-
216
parse_primitive_field(model,entry,'response','response',false)
-
216
parse_primitive_field(model,entry,'responseCode','responseCode',false)
-
216
parse_primitive_field(model,entry,'sourceId','sourceId',false)
-
216
parse_primitive_field(model,entry,'validateProfileId','validateProfileId',false)
-
216
parse_primitive_field(model,entry,'value','value',false)
-
216
parse_primitive_field(model,entry,'warningOnly','warningOnly',false)
-
216
model
-
end
-
-
1
def parse_xml_entry_TestScriptSetupActionComponent(entry)
-
24
return nil unless entry
-
24
model = FHIR::TestScript::TestScriptSetupActionComponent.new
-
24
self.parse_element_data(model, entry)
-
24
set_model_data(model, 'operation', parse_xml_entry_TestScriptSetupActionOperationComponent(entry.at_xpath('./fhir:operation')))
-
24
set_model_data(model, 'assert', parse_xml_entry_TestScriptSetupActionAssertComponent(entry.at_xpath('./fhir:assert')))
-
24
model
-
end
-
-
1
def parse_xml_entry_TestScriptSetupComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::TestScript::TestScriptSetupComponent.new
-
16
self.parse_element_data(model, entry)
-
16
set_model_data(model, 'metadata', parse_xml_entry_TestScriptMetadataComponent(entry.at_xpath('./fhir:metadata')))
-
40
set_model_data(model, 'action', entry.xpath('./fhir:action').map {|e| parse_xml_entry_TestScriptSetupActionComponent(e)})
-
16
model
-
end
-
-
1
def parse_xml_entry_TestScriptTestActionComponent(entry)
-
256
return nil unless entry
-
256
model = FHIR::TestScript::TestScriptTestActionComponent.new
-
256
self.parse_element_data(model, entry)
-
256
set_model_data(model, 'operation', parse_xml_entry_TestScriptSetupActionOperationComponent(entry.at_xpath('./fhir:operation')))
-
256
set_model_data(model, 'assert', parse_xml_entry_TestScriptSetupActionAssertComponent(entry.at_xpath('./fhir:assert')))
-
256
model
-
end
-
-
1
def parse_xml_entry_TestScriptTestComponent(entry)
-
32
return nil unless entry
-
32
model = FHIR::TestScript::TestScriptTestComponent.new
-
32
self.parse_element_data(model, entry)
-
32
parse_primitive_field(model,entry,'name','name',false)
-
32
parse_primitive_field(model,entry,'description','description',false)
-
32
set_model_data(model, 'metadata', parse_xml_entry_TestScriptMetadataComponent(entry.at_xpath('./fhir:metadata')))
-
288
set_model_data(model, 'action', entry.xpath('./fhir:action').map {|e| parse_xml_entry_TestScriptTestActionComponent(e)})
-
32
model
-
end
-
-
1
def parse_xml_entry_TestScriptTeardownActionComponent(entry)
-
16
return nil unless entry
-
16
model = FHIR::TestScript::TestScriptTeardownActionComponent.new
-
16
self.parse_element_data(model, entry)
-
16
set_model_data(model, 'operation', parse_xml_entry_TestScriptSetupActionOperationComponent(entry.at_xpath('./fhir:operation')))
-
16
model
-
end
-
-
1
def parse_xml_entry_TestScriptTeardownComponent(entry)
-
16
return nil unless entry
-
8
model = FHIR::TestScript::TestScriptTeardownComponent.new
-
8
self.parse_element_data(model, entry)
-
24
set_model_data(model, 'action', entry.xpath('./fhir:action').map {|e| parse_xml_entry_TestScriptTeardownActionComponent(e)})
-
8
model
-
end
-
-
1
def parse_xml_entry(entry)
-
16
return nil unless entry
-
16
model = self.new
-
16
self.parse_element_data(model, entry)
-
16
self.parse_resource_data(model, entry)
-
16
parse_primitive_field(model,entry,'url','url',false)
-
16
parse_primitive_field(model,entry,'version','versionNum',false)
-
16
parse_primitive_field(model,entry,'name','name',false)
-
16
parse_primitive_field(model,entry,'status','status',false)
-
16
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
16
parse_primitive_field(model,entry,'experimental','experimental',false)
-
16
parse_primitive_field(model,entry,'publisher','publisher',false)
-
24
set_model_data(model, 'contact', entry.xpath('./fhir:contact').map {|e| parse_xml_entry_TestScriptContactComponent(e)})
-
16
parse_primitive_field(model,entry,'date','date',false)
-
16
parse_primitive_field(model,entry,'description','description',false)
-
24
set_model_data(model, 'useContext', entry.xpath('./fhir:useContext').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
16
parse_primitive_field(model,entry,'requirements','requirements',false)
-
16
parse_primitive_field(model,entry,'copyright','copyright',false)
-
16
set_model_data(model, 'metadata', parse_xml_entry_TestScriptMetadataComponent(entry.at_xpath('./fhir:metadata')))
-
16
parse_primitive_field(model,entry,'multiserver','multiserver',false)
-
32
set_model_data(model, 'fixture', entry.xpath('./fhir:fixture').map {|e| parse_xml_entry_TestScriptFixtureComponent(e)})
-
24
set_model_data(model, 'profile', entry.xpath('./fhir:profile').map {|e| FHIR::Reference.parse_xml_entry(e)})
-
16
set_model_data(model, 'variable', entry.xpath('./fhir:variable').map {|e| parse_xml_entry_TestScriptVariableComponent(e)})
-
16
set_model_data(model, 'setup', parse_xml_entry_TestScriptSetupComponent(entry.at_xpath('./fhir:setup')))
-
48
set_model_data(model, 'test', entry.xpath('./fhir:test').map {|e| parse_xml_entry_TestScriptTestComponent(e)})
-
16
set_model_data(model, 'teardown', parse_xml_entry_TestScriptTeardownComponent(entry.at_xpath('./fhir:teardown')))
-
16
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Timing
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_TimingRepeatComponent(entry)
-
240
return nil unless entry
-
240
model = FHIR::Timing::TimingRepeatComponent.new
-
240
self.parse_element_data(model, entry)
-
240
set_model_data(model, 'boundsQuantity', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:boundsQuantity')))
-
240
set_model_data(model, 'boundsRange', FHIR::Range.parse_xml_entry(entry.at_xpath('./fhir:boundsRange')))
-
240
set_model_data(model, 'boundsPeriod', FHIR::Period.parse_xml_entry(entry.at_xpath('./fhir:boundsPeriod')))
-
240
parse_primitive_field(model,entry,'count','count',false)
-
240
parse_primitive_field(model,entry,'duration','duration',false)
-
240
parse_primitive_field(model,entry,'durationMax','durationMax',false)
-
240
parse_primitive_field(model,entry,'durationUnits','durationUnits',false)
-
240
parse_primitive_field(model,entry,'frequency','frequency',false)
-
240
parse_primitive_field(model,entry,'frequencyMax','frequencyMax',false)
-
240
parse_primitive_field(model,entry,'period','period',false)
-
240
parse_primitive_field(model,entry,'periodMax','periodMax',false)
-
240
parse_primitive_field(model,entry,'periodUnits','periodUnits',false)
-
240
parse_primitive_field(model,entry,'when','when',false)
-
240
model
-
end
-
-
1
def parse_xml_entry(entry)
-
504
return nil unless entry
-
240
model = self.new
-
240
self.parse_element_data(model, entry)
-
240
parse_primitive_field(model,entry,'event','event',true)
-
240
set_model_data(model, 'repeat', parse_xml_entry_TimingRepeatComponent(entry.at_xpath('./fhir:repeat')))
-
240
set_model_data(model, 'code', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:code')))
-
240
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module ValueSet
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_ValueSetContactComponent(entry)
-
805
return nil unless entry
-
805
model = FHIR::ValueSet::ValueSetContactComponent.new
-
805
self.parse_element_data(model, entry)
-
805
parse_primitive_field(model,entry,'name','name',false)
-
1812
set_model_data(model, 'telecom', entry.xpath('./fhir:telecom').map {|e| FHIR::ContactPoint.parse_xml_entry(e)})
-
805
model
-
end
-
-
1
def parse_xml_entry_ConceptDefinitionDesignationComponent(entry)
-
713
return nil unless entry
-
713
model = FHIR::ValueSet::ConceptDefinitionDesignationComponent.new
-
713
self.parse_element_data(model, entry)
-
713
parse_primitive_field(model,entry,'language','language',false)
-
713
set_model_data(model, 'use', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:use')))
-
713
parse_primitive_field(model,entry,'value','value',false)
-
713
model
-
end
-
-
1
def parse_xml_entry_ConceptDefinitionComponent(entry)
-
30984
return nil unless entry
-
30984
model = FHIR::ValueSet::ConceptDefinitionComponent.new
-
30984
self.parse_element_data(model, entry)
-
30984
parse_primitive_field(model,entry,'code','code',false)
-
30984
parse_primitive_field(model,entry,'abstract','abstract',false)
-
30984
parse_primitive_field(model,entry,'display','display',false)
-
30984
parse_primitive_field(model,entry,'definition','definition',false)
-
31671
set_model_data(model, 'designation', entry.xpath('./fhir:designation').map {|e| parse_xml_entry_ConceptDefinitionDesignationComponent(e)})
-
36294
set_model_data(model, 'concept', entry.xpath('./fhir:concept').map {|e| parse_xml_entry_ConceptDefinitionComponent(e)})
-
30984
model
-
end
-
-
1
def parse_xml_entry_ValueSetCodeSystemComponent(entry)
-
1507
return nil unless entry
-
1024
model = FHIR::ValueSet::ValueSetCodeSystemComponent.new
-
1024
self.parse_element_data(model, entry)
-
1024
parse_primitive_field(model,entry,'system','system',false)
-
1024
parse_primitive_field(model,entry,'version','versionNum',false)
-
1024
parse_primitive_field(model,entry,'caseSensitive','caseSensitive',false)
-
26698
set_model_data(model, 'concept', entry.xpath('./fhir:concept').map {|e| parse_xml_entry_ConceptDefinitionComponent(e)})
-
1024
model
-
end
-
-
1
def parse_xml_entry_ConceptReferenceComponent(entry)
-
15048
return nil unless entry
-
15048
model = FHIR::ValueSet::ConceptReferenceComponent.new
-
15048
self.parse_element_data(model, entry)
-
15048
parse_primitive_field(model,entry,'code','code',false)
-
15048
parse_primitive_field(model,entry,'display','display',false)
-
15074
set_model_data(model, 'designation', entry.xpath('./fhir:designation').map {|e| parse_xml_entry_ConceptDefinitionDesignationComponent(e)})
-
15048
model
-
end
-
-
1
def parse_xml_entry_ConceptSetFilterComponent(entry)
-
133
return nil unless entry
-
133
model = FHIR::ValueSet::ConceptSetFilterComponent.new
-
133
self.parse_element_data(model, entry)
-
133
parse_primitive_field(model,entry,'property','property',false)
-
133
parse_primitive_field(model,entry,'op','op',false)
-
133
parse_primitive_field(model,entry,'value','value',false)
-
133
model
-
end
-
-
1
def parse_xml_entry_ConceptSetComponent(entry)
-
578
return nil unless entry
-
578
model = FHIR::ValueSet::ConceptSetComponent.new
-
578
self.parse_element_data(model, entry)
-
578
parse_primitive_field(model,entry,'system','system',false)
-
578
parse_primitive_field(model,entry,'version','versionNum',false)
-
15626
set_model_data(model, 'concept', entry.xpath('./fhir:concept').map {|e| parse_xml_entry_ConceptReferenceComponent(e)})
-
711
set_model_data(model, 'filter', entry.xpath('./fhir:filter').map {|e| parse_xml_entry_ConceptSetFilterComponent(e)})
-
578
model
-
end
-
-
1
def parse_xml_entry_ValueSetComposeComponent(entry)
-
1507
return nil unless entry
-
490
model = FHIR::ValueSet::ValueSetComposeComponent.new
-
490
self.parse_element_data(model, entry)
-
490
parse_primitive_field(model,entry,'import','import',true)
-
1043
set_model_data(model, 'include', entry.xpath('./fhir:include').map {|e| parse_xml_entry_ConceptSetComponent(e)})
-
515
set_model_data(model, 'exclude', entry.xpath('./fhir:exclude').map {|e| parse_xml_entry_ConceptSetComponent(e)})
-
490
model
-
end
-
-
1
def parse_xml_entry_ValueSetExpansionParameterComponent(entry)
-
9
return nil unless entry
-
9
model = FHIR::ValueSet::ValueSetExpansionParameterComponent.new
-
9
self.parse_element_data(model, entry)
-
9
parse_primitive_field(model,entry,'name','name',false)
-
9
parse_primitive_field(model,entry,'valueString','valueString',false)
-
9
parse_primitive_field(model,entry,'valueBoolean','valueBoolean',false)
-
9
parse_primitive_field(model,entry,'valueInteger','valueInteger',false)
-
9
parse_primitive_field(model,entry,'valueDecimal','valueDecimal',false)
-
9
parse_primitive_field(model,entry,'valueUri','valueUri',false)
-
9
parse_primitive_field(model,entry,'valueCode','valueCode',false)
-
9
model
-
end
-
-
1
def parse_xml_entry_ValueSetExpansionContainsComponent(entry)
-
117
return nil unless entry
-
117
model = FHIR::ValueSet::ValueSetExpansionContainsComponent.new
-
117
self.parse_element_data(model, entry)
-
117
parse_primitive_field(model,entry,'system','system',false)
-
117
parse_primitive_field(model,entry,'abstract','abstract',false)
-
117
parse_primitive_field(model,entry,'version','versionNum',false)
-
117
parse_primitive_field(model,entry,'code','code',false)
-
117
parse_primitive_field(model,entry,'display','display',false)
-
180
set_model_data(model, 'contains', entry.xpath('./fhir:contains').map {|e| parse_xml_entry_ValueSetExpansionContainsComponent(e)})
-
117
model
-
end
-
-
1
def parse_xml_entry_ValueSetExpansionComponent(entry)
-
1507
return nil unless entry
-
18
model = FHIR::ValueSet::ValueSetExpansionComponent.new
-
18
self.parse_element_data(model, entry)
-
18
parse_primitive_field(model,entry,'identifier','identifier',false)
-
18
parse_primitive_field(model,entry,'timestamp','timestamp',false)
-
18
parse_primitive_field(model,entry,'total','total',false)
-
18
parse_primitive_field(model,entry,'offset','offset',false)
-
27
set_model_data(model, 'parameter', entry.xpath('./fhir:parameter').map {|e| parse_xml_entry_ValueSetExpansionParameterComponent(e)})
-
72
set_model_data(model, 'contains', entry.xpath('./fhir:contains').map {|e| parse_xml_entry_ValueSetExpansionContainsComponent(e)})
-
18
model
-
end
-
-
1
def parse_xml_entry(entry)
-
1507
return nil unless entry
-
1507
model = self.new
-
1507
self.parse_element_data(model, entry)
-
1507
self.parse_resource_data(model, entry)
-
1507
parse_primitive_field(model,entry,'url','url',false)
-
1507
set_model_data(model, 'identifier', FHIR::Identifier.parse_xml_entry(entry.at_xpath('./fhir:identifier')))
-
1507
parse_primitive_field(model,entry,'version','versionNum',false)
-
1507
parse_primitive_field(model,entry,'name','name',false)
-
1507
parse_primitive_field(model,entry,'status','status',false)
-
1507
parse_primitive_field(model,entry,'experimental','experimental',false)
-
1507
parse_primitive_field(model,entry,'publisher','publisher',false)
-
2312
set_model_data(model, 'contact', entry.xpath('./fhir:contact').map {|e| parse_xml_entry_ValueSetContactComponent(e)})
-
1507
parse_primitive_field(model,entry,'date','date',false)
-
1507
parse_primitive_field(model,entry,'lockedDate','lockedDate',false)
-
1507
parse_primitive_field(model,entry,'description','description',false)
-
1509
set_model_data(model, 'useContext', entry.xpath('./fhir:useContext').map {|e| FHIR::CodeableConcept.parse_xml_entry(e)})
-
1507
parse_primitive_field(model,entry,'immutable','immutable',false)
-
1507
parse_primitive_field(model,entry,'requirements','requirements',false)
-
1507
parse_primitive_field(model,entry,'copyright','copyright',false)
-
1507
parse_primitive_field(model,entry,'extensible','extensible',false)
-
1507
set_model_data(model, 'codeSystem', parse_xml_entry_ValueSetCodeSystemComponent(entry.at_xpath('./fhir:codeSystem')))
-
1507
set_model_data(model, 'compose', parse_xml_entry_ValueSetComposeComponent(entry.at_xpath('./fhir:compose')))
-
1507
set_model_data(model, 'expansion', parse_xml_entry_ValueSetExpansionComponent(entry.at_xpath('./fhir:expansion')))
-
1507
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module VisionPrescription
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Deserializer::Utilities
-
1
def parse_xml_entry_VisionPrescriptionDispenseComponent(entry)
-
32
return nil unless entry
-
32
model = FHIR::VisionPrescription::VisionPrescriptionDispenseComponent.new
-
32
self.parse_element_data(model, entry)
-
32
set_model_data(model, 'product', FHIR::Coding.parse_xml_entry(entry.at_xpath('./fhir:product')))
-
32
parse_primitive_field(model,entry,'eye','eye',false)
-
32
parse_primitive_field(model,entry,'sphere','sphere',false)
-
32
parse_primitive_field(model,entry,'cylinder','cylinder',false)
-
32
parse_primitive_field(model,entry,'axis','axis',false)
-
32
parse_primitive_field(model,entry,'prism','prism',false)
-
32
parse_primitive_field(model,entry,'base','base',false)
-
32
parse_primitive_field(model,entry,'add','add',false)
-
32
parse_primitive_field(model,entry,'power','power',false)
-
32
parse_primitive_field(model,entry,'backCurve','backCurve',false)
-
32
parse_primitive_field(model,entry,'diameter','diameter',false)
-
32
set_model_data(model, 'duration', FHIR::Quantity.parse_xml_entry(entry.at_xpath('./fhir:duration')))
-
32
parse_primitive_field(model,entry,'color','color',false)
-
32
parse_primitive_field(model,entry,'brand','brand',false)
-
32
parse_primitive_field(model,entry,'notes','notes',false)
-
32
model
-
end
-
-
1
def parse_xml_entry(entry)
-
16
return nil unless entry
-
16
model = self.new
-
16
self.parse_element_data(model, entry)
-
16
self.parse_resource_data(model, entry)
-
32
set_model_data(model, 'identifier', entry.xpath('./fhir:identifier').map {|e| FHIR::Identifier.parse_xml_entry(e)})
-
16
parse_primitive_field(model,entry,'dateWritten','dateWritten',false)
-
16
set_model_data(model, 'patient', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:patient')))
-
16
set_model_data(model, 'prescriber', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:prescriber')))
-
16
set_model_data(model, 'encounter', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:encounter')))
-
16
set_model_data(model, 'reasonCodeableConcept', FHIR::CodeableConcept.parse_xml_entry(entry.at_xpath('./fhir:reasonCodeableConcept')))
-
16
set_model_data(model, 'reasonReference', FHIR::Reference.parse_xml_entry(entry.at_xpath('./fhir:reasonReference')))
-
48
set_model_data(model, 'dispense', entry.xpath('./fhir:dispense').map {|e| parse_xml_entry_VisionPrescriptionDispenseComponent(e)})
-
16
model
-
end
-
end
-
end
-
end
-
1
module FHIR
-
1
module Deserializer
-
1
module Utilities
-
1
def set_model_data(model, typeName, value)
-
1928708
begin
-
1928708
model[typeName] = value if value;
-
rescue Exception => e
-
$LOG.error "Failed to set model data: #{model.class}, #{typeName}, #{value}: #{e.message}"
-
end
-
end
-
1
def from_xml(xml_contents)
-
2978
doc = Nokogiri::XML(xml_contents)
-
2978
doc.root.add_namespace_definition('fhir', 'http://hl7.org/fhir')
-
2978
doc.root.add_namespace_definition('xhtml', 'http://www.w3.org/1999/xhtml')
-
2978
entry = doc.at_xpath("./fhir:#{self.name.demodulize}")
-
2978
self.parse_xml_entry(entry)
-
end
-
-
# parse elements from the base element
-
# xml id
-
1
def parse_element_data(model, entry)
-
294353
model.xmlId = entry.at_xpath('./fhir:id/@value').try(:value) || entry.at_xpath('@id').try(:value)
-
294353
entry.xpath('./fhir:extension').each do |extension_entry|
-
8201
model.extension ||= []
-
8201
model.extension << FHIR::Extension.parse_xml_entry(extension_entry)
-
end
-
-
294353
entry.xpath('./fhir:modifierExtension').each do |extension_entry|
-
517
model.modifierExtension ||= []
-
517
model.modifierExtension << FHIR::Extension.parse_xml_entry(extension_entry)
-
end
-
end
-
-
# parse elements from the base resource
-
# narrative
-
# contained array
-
1
def parse_resource_data(model, entry)
-
16683
set_model_data(model, 'text', FHIR::Narrative.parse_xml_entry(entry.at_xpath('./fhir:text')))
-
-
16683
entry.xpath('./fhir:contained/*').each do |contained_entry|
-
6729
model.contained ||= []
-
6729
if is_fhir_class?("FHIR::#{contained_entry.name}")
-
6729
model.contained << "FHIR::#{contained_entry.name}".constantize.parse_xml_entry(contained_entry)
-
end
-
end
-
-
16683
set_model_data(model, 'meta', parse_resource_metadata(entry.at_xpath('./fhir:meta')))
-
16683
set_model_data(model, 'implicitRules', entry.at_xpath('./fhir:implicitRules/@value').try(:value))
-
16683
set_model_data(model, 'language', entry.at_xpath('./fhir:language/@value').try(:value))
-
-
end
-
-
1
def parse_resource_metadata(entry)
-
16683
return nil unless entry
-
6427
model = FHIR::Resource::ResourceMetaComponent.new
-
6427
self.parse_element_data(model, entry)
-
6427
set_model_data(model, 'versionId', entry.at_xpath('./fhir:versionId/@value').try(:value))
-
6427
set_model_data(model, 'lastUpdated', entry.at_xpath('./fhir:lastUpdated/@value').try(:value))
-
7291
set_model_data(model, 'profile', entry.xpath('./fhir:profile/@value').map {|e| e.value })
-
6427
set_model_data(model, 'security', entry.xpath('./fhir:security').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
6427
set_model_data(model, 'tag', entry.xpath('./fhir:tag').map {|e| FHIR::Coding.parse_xml_entry(e)})
-
6427
model
-
end
-
-
1
def parse_primitive_field(model,entry,xmlField,modelField,multipleCardinality=false)
-
1165236
return nil unless entry && xmlField && modelField
-
-
1165236
selector = "./fhir:#{xmlField}"
-
1165236
extension_selector = "./fhir:extension"
-
-
1165236
if multipleCardinality
-
116513
data = []
-
116513
extensions = []
-
116513
entry.xpath(selector).each do |e|
-
21724
data << e.at_xpath('@value').try(:value)
-
21724
extension = e.at_xpath(extension_selector)
-
21724
if extension
-
16
extensions << FHIR::Extension.parse_xml_entry(extension)
-
else
-
21708
extensions << nil
-
end
-
end
-
116513
set_model_data(model,modelField,data)
-
138237
if extensions.select{|x|!x.nil?}.any?
-
16
pext = FHIR::PrimitiveExtension.new
-
16
pext['path'] = "_#{xmlField}"
-
16
pext['extension'] = extensions
-
16
model['primitiveExtension'] ||= []
-
16
model['primitiveExtension'] << pext
-
end
-
else
-
1048723
element = entry.at_xpath(selector)
-
1048723
data = element.at_xpath('@value').try(:value) if element
-
1048723
set_model_data(model,modelField,data)
-
1048723
extension = FHIR::Extension.parse_xml_entry( element.at_xpath(extension_selector) ) if element
-
1048723
if extension
-
64
pext = FHIR::PrimitiveExtension.new
-
64
pext['path'] = "_#{xmlField}"
-
64
pext['extension'] = [ extension ]
-
64
model['primitiveExtension'] ||= []
-
64
model['primitiveExtension'] << pext
-
end
-
end
-
end
-
-
# Deserialize JSON into a single FHIR Resource
-
1
def from_fhir_json(json)
-
1486
decodeHash(json,0)
-
end
-
-
1
def decodeHash(h,depth)
-
# if the input is a String, convert it into a Hash
-
87120
if h.is_a? String
-
1486
begin
-
1486
if h.encoding.names.include? 'UTF-8'
-
1486
h.gsub!("\xEF\xBB\xBF".force_encoding('UTF-8'), '') # remove UTF-8 BOM
-
end
-
1486
h = JSON.parse(h)
-
rescue Exception => e
-
$LOG.error "Failed to parse JSON hash as resource: #{e.message} %n #{h} %n #{e.backtrace.join("\n")}"
-
return nil
-
end
-
end
-
-
87120
objClass = nil
-
87120
resourceType = h['resourceType']
-
87120
if !resourceType.nil?
-
87120
objClass = get_fhir_class_from_resource_type(resourceType)
-
# puts ' ' * depth + "This is FHIR resource: #{objClass.to_s}"
-
end
-
-
87120
if objClass.nil?
-
raise "Deserialization failure: Cannot identify FHIR class. No 'resourceType' attribute."
-
end
-
-
87120
obj = objClass.new
-
-
87120
h.each do |key,value|
-
314530
fixed = fix_key(key)
-
-
314530
if fixed[0]=='_'
-
714
r = Regexp.new "^#{fixed[1..-1]}="
-
714
s = objClass.instance_methods.grep r
-
714
if !s.empty?
-
# this should be a hash holding with one property 'extension'
-
# which contains an array of extensions
-
684
begin
-
684
pext = FHIR::PrimitiveExtension.new
-
684
pext['path'] = fixed
-
684
if value.is_a? Hash
-
676
pext['extension'] = [ decodeExtension( value['extension'].first, depth+1 ) ] if value['extension'].try(:first)
-
elsif value.is_a? Array
-
8
pext['extension'] = value.map do | extension |
-
16
ext = nil
-
16
ext = decodeExtension( extension['extension'].first, depth+1 ) if !extension.nil?
-
16
ext
-
end
-
end
-
684
if pext['extension']
-
40
obj['primitiveExtension'] = [] if obj['primitiveExtension'].nil?
-
40
obj['primitiveExtension'] << pext
-
end
-
rescue Exception => e
-
# binding.pry
-
end
-
end
-
714
next
-
end
-
-
313816
regex = Regexp.new "^#{fixed}="
-
313816
setter = objClass.instance_methods.grep regex
-
313816
if setter.empty?
-
# AnyType check, looking for a method of the format 'prefix=' where our
-
# current fixed/key is something like prefixDecimal (e.g. prefix[x] of AnyType)
-
85430
begin
-
86582
prefixes = objClass::ANY_TYPES.select{|x| fixed.starts_with?(x)}
-
192
prefixes.each do |prefix|
-
4
regex = Regexp.new "^#{prefix}="
-
4
temp = objClass.instance_methods.grep(regex)
-
4
if !temp.empty?
-
4
datatype = fixed.gsub(prefix,'')
-
4
obj[prefix] = FHIR::AnyType.new(datatype,value)
-
end
-
end
-
rescue Exception => e
-
# this class does not have any attributes with type=='*'
-
end
-
end
-
-
313816
if !setter.empty?
-
228386
if value.is_a? Hash
-
# puts ' ' * depth + "Key: #{key} is a Hash"
-
36876
if !value['resourceType'].nil? and !value['resourceType'].empty?
-
# puts ' ' * depth + "Key: #{key} is marked as FHIR resource"
-
# This is a FHIR Resource, let's decode it...
-
2800
child = decodeHash(value,depth+1)
-
2800
set_model_data(obj, fixed, child)
-
else
-
# puts ' ' * depth + "try to discover what kind of resource this is..."
-
34076
metadata = obj.reflect_on_association(fixed)
-
34076
if !metadata.class_name.nil?
-
# puts ' ' * depth + "Key: #{key} is a #{metadata.class_name}?"
-
34076
value['resourceType'] = metadata.class_name
-
34076
child = decodeHash(value,depth+1)
-
34076
set_model_data(obj, fixed, child)
-
else
-
raise "Could not discover resourceType for '#{fixed}' inside '#{resourceType}'"
-
end
-
end
-
elsif value.is_a? Array
-
# puts ' ' * depth + "Key: #{key} is an Array"
-
# This is an array... decode each element...
-
31564
value.map! do |item|
-
53892
if item.is_a? Hash
-
# puts ' ' * depth + " - Array Item is a Hash"
-
50066
rt = item['resourceType']
-
50066
if !rt.nil?
-
# puts ' ' * depth + " -- Array Item is a FHIR Type"
-
3364
child = decodeHash(item,depth+1)
-
3364
next child
-
else
-
# try to discover what kind of resource this is...
-
# puts ' ' * depth + " -- try to discover what kind of resource this is..."
-
46702
metadata = obj.reflect_on_association(fixed)
-
46702
if !metadata.class_name.nil?
-
# puts ' ' * depth + " -- Array Item is a #{metadata.class_name}"
-
46702
child = nil
-
46702
if metadata.class_name=='FHIR::Extension'
-
2452
child = decodeExtension(item,depth+1)
-
else
-
44250
item['resourceType'] = metadata.class_name
-
44250
child = decodeHash(item,depth+1)
-
end
-
46702
next child
-
else
-
raise "Could not discover resourceType for '#{fixed}' inside '#{resourceType}'"
-
end
-
end
-
elsif item.is_a? Array
-
raise "Cannot handle array of arrays in deserialization of '#{objClass.to_s}.#{fixed}'"
-
else
-
# puts ' ' * depth + " - Array Item is a primitive"
-
3826
next item # .. this is probably a primitive data type
-
end
-
end
-
31564
set_model_data(obj, fixed, value)
-
elsif value.is_a?(String) || value.is_a?(TrueClass) || value.is_a?(FalseClass) || value.is_a?(Numeric)
-
# puts ' ' * depth + "Key: #{key} is a recognized primitive"
-
# do nothing, we can set Strings and booleans directly
-
159946
obj[fixed] = value
-
else
-
# puts ' ' * depth + "I didn't expect this: '#{objClass.to_s}.#{key}' of type '#{value.class}'"
-
end
-
else
-
# We're ignoring this key, there is no associated setter method.
-
# TODO raise an exception? log the issue?
-
# puts ' ' * depth + "Ignoring '#{key}', no associated setter."
-
end
-
end
-
-
87120
obj
-
end # eof decodeHash function
-
-
1
def decodeExtension(item,depth)
-
3164
child = FHIR::Extension.new
-
3164
begin
-
3164
child.url = item['url']
-
rescue Exception => e
-
puts e.message
-
# binding.pry
-
end
-
3164
item.keys.each do |ekey|
-
6450
if ekey.starts_with? 'value'
-
2828
d = ekey[5..-1]
-
2828
if item[ekey].is_a? Hash
-
1144
item[ekey]['resourceType'] = ekey[5..-1]
-
1144
v = decodeHash(item[ekey],depth+1)
-
else
-
1684
v = item[ekey]
-
end
-
2828
child.value = FHIR::AnyType.new(d,v)
-
elsif ekey == 'extension'
-
336
child.extension = [] if child.extension.nil?
-
336
item[ekey].each do |x|
-
672
child.extension << decodeExtension(x,depth+1)
-
end
-
elsif ekey == 'modifierExtension'
-
child.modifierExtension = [] if child.modifierExtension.nil?
-
item[ekey].each do |x|
-
child.modifierExtension << decodeExtension(x,depth+1)
-
end
-
end
-
end
-
3164
child
-
end
-
-
end
-
end
-
end
-
1
module FHIR
-
1
module Formats
-
1
module Utilities
-
-
1
def is_fhir_class?(classname)
-
158499840
fhir_classes = Mongoid.models.select {|c| c.name.include? 'FHIR'}
-
158033664
fhir_classes.map! {|c| c.to_s }
-
466176
return classname!='FHIR::PrimitiveExtension' && fhir_classes.include?(classname)
-
end
-
-
1
def equals?(other, exclude=['_id'])
-
self.attributes.except(*exclude).keys.each do |key|
-
return false unless compare_attribute(self[key], other[key], exclude)
-
end
-
true
-
end
-
-
1
def mismatch(other, exclude=['_id'])
-
misses = []
-
self.attributes.except(*exclude).keys.each do |key|
-
these = attribute_mismatch(self[key], other[key], exclude)
-
if !these || (these.is_a?(Array) && !these.empty?)
-
misses << "#{self.class}::#{key}"
-
misses.concat these if these.is_a?(Array)
-
end
-
end
-
misses
-
end
-
-
1
def attribute_mismatch(left, right, exclude=['_id'])
-
if left.respond_to?(:mismatch) && right.respond_to?(:mismatch)
-
left.mismatch right, exclude
-
else
-
compare_attribute(left, right, exclude)
-
end
-
end
-
-
-
1
def compare_attribute(left, right, exclude=['_id'])
-
if left.respond_to?(:equals?) && right.respond_to?(:equals?)
-
left.equals? right, exclude
-
elsif left.is_a?(Array) && right.is_a?(Array) && (left.length == right.length)
-
result = true
-
(0...(left.length)).each {|i| result &&= compare_attribute(left[i], right[i])}
-
result
-
else
-
left == right
-
end
-
end
-
-
1
def get_fhir_class_from_resource_type(resourceType)
-
29620800
fhir_classes = Mongoid.models.select {|c| c.name.include? 'FHIR' and c.name.include? resourceType }
-
202086
fhir_classes = fhir_classes.sort_by { |c| c.to_s.length }
-
87120
retClass = nil
-
87120
if !fhir_classes.empty?
-
87120
retClass = fhir_classes[0]
-
end
-
87120
retClass
-
end
-
-
1
def fix_key(key)
-
619154
fixed = key
-
619154
if !fixed.nil? && fixed[0]=='_'
-
756
fixed = fixed[1..-1]
-
756
underscore = true
-
end
-
619154
keys = { 'type' => 'fhirType',
-
'collection' => 'fhirCollection',
-
'deleted' => 'fhirDeleted',
-
'version' => 'versionNum',
-
'class' => 'fhirClass',
-
'xmlId' => 'id',
-
'id' => 'xmlId',
-
'hash' => 'fhirHash',
-
'identity' => 'fhirIdentity',
-
'modifier' => 'fhirModifier',
-
'validated' => 'fhirValidated' }
-
619154
keys.merge!(keys.invert)
-
619154
if keys.has_key? key
-
26744
fixed = keys[key]
-
end
-
619154
fixed = "_#{fixed}" if underscore
-
619154
fixed
-
end
-
-
1
def fix_all_keys(hash)
-
113416
copy = {}
-
418040
hash.each {|key,value| copy[fix_key(key)] = value }
-
113416
copy
-
end
-
-
end
-
end
-
end
-
1
module FHIR
-
-
1
class AnyType
-
-
1
attr_accessor :type
-
1
attr_accessor :value
-
-
1
PRIMITIVES = ['integer','positiveInt','unsignedInt','decimal','string','markdown','uri','oid','boolean','code','id','base64binary']
-
1
DATE_TIMES = ['datetime','date','time','instant']
-
-
1
def initialize(type,value)
-
12235
@type = type
-
12235
@value = value
-
end
-
-
# # Converts an object of this instance into a database friendly value.
-
# def mongoize
-
# {'type'=>type, 'value'=>val}
-
# end
-
-
# class << self
-
-
# # Get the object as it was stored in the database, and instantiate
-
# # this custom class from it.
-
# def demongoize(object)
-
# case object
-
# when Hash
-
# type = object['type']
-
# value = object['value']
-
# type.constantize.create(value)
-
# else
-
# object
-
# end
-
# end
-
-
# # Takes any possible object and converts it to how it would be
-
# # stored in the database.
-
# def mongoize(object)
-
# case object
-
# when AnyType then object.mongoize
-
# when Hash
-
# v = object[:value]
-
# case object[:type].downcase
-
# when 'integer', 'decimal', 'boolean'
-
# v = YAML.load(v)
-
# end
-
# convertType(v)
-
# else
-
# convertType(object)
-
# end
-
# end
-
-
# def convertType(object)
-
# if (object.respond_to?(:is_fhir_class?) && object.is_fhir_class?(object.class.name))
-
# AnyType.new(object).mongoize
-
# else
-
# object
-
# end
-
# end
-
-
# # Converts the object that was supplied to a criteria and converts it
-
# # into a database friendly form.
-
# def evolve(object)
-
# case object
-
# when AnyType then object.mongoize
-
# else object
-
# end
-
# end
-
-
# end
-
end
-
end
-
# see mongoid model for inclusion
-
1
module FHIR
-
1
module Element
-
# include elements from the core base
-
# xml id
-
1
def self.included(base)
-
337
base.send(:field, :xmlId, type: String)
-
337
base.send(:embeds_many, :extension, class_name:'FHIR::Extension', cyclic: true)
-
337
base.send(:embeds_many, :modifierExtension, class_name:'FHIR::Extension', cyclic: true)
-
337
base.send(:embeds_many, :primitiveExtension, class_name: 'FHIR::PrimitiveExtension', cyclic: true)
-
end
-
-
1
def has_primitive_extension?(field,index=0)
-
296123
pe = primitiveExtension.select{|pe|pe.path=="_#{field}"}.first
-
295907
!pe.nil? && !pe['extension'].nil? && !pe['extension'][index].nil?
-
end
-
-
1
def get_primitive_extension(field,index=0)
-
160
pe = primitiveExtension.select{|pe|pe.path=="_#{field}"}.first
-
80
pe = pe['extension'][index] if pe && pe['extension'] && pe['extension'][index]
-
end
-
-
end
-
end
-
# see mongoid model for inclusion
-
1
module FHIR
-
1
class PrimitiveExtension
-
1
include Mongoid::Document
-
-
1
field :path, type: String
-
1
embeds_many :extension, class_name:'FHIR::Extension'
-
-
end
-
end
-
# see mongoid model for inclusion
-
1
module FHIR
-
1
module Resource
-
# include elements from the base resource
-
# narrative
-
# contained array
-
1
def self.included(base)
-
93
base.send(:embeds_one, :text, class_name:'FHIR::Narrative')
-
93
base.send(:field, :contained, type: Array)
-
93
base.send(:embeds_one, :meta, class_name:'FHIR::Resource::ResourceMetaComponent')
-
93
base.send(:field, :implicitRules, type: String)
-
93
base.send(:field, :language, type: String)
-
end
-
-
1
def self.from_contents(contents)
-
doc = Nokogiri::XML(contents)
-
if doc.errors.empty?
-
doc.root.add_namespace_definition('fhir', 'http://hl7.org/fhir')
-
doc.root.add_namespace_definition('xhtml', 'http://www.w3.org/1999/xhtml')
-
"FHIR::#{doc.at_xpath('/*').name}".constantize.from_xml(contents)
-
else
-
"FHIR::#{JSON.parse(contents)['resourceType']}".constantize.from_fhir_json(contents)
-
end
-
end
-
-
1
class ResourceMetaComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :versionId, type: String
-
1
field :lastUpdated, type: String
-
1
validates :lastUpdated, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
1
field :profile, type: Array # Array of Strings
-
1
embeds_many :security, class_name:'FHIR::Coding'
-
1
embeds_many :tag, class_name:'FHIR::Coding'
-
end
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Account
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Account
-
-
1
SEARCH_PARAMS = [
-
'owner',
-
'identifier',
-
'period',
-
'balance',
-
'subject',
-
'patient',
-
'name',
-
'type',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'active', 'inactive' ]
-
}
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :name, type: String
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
field :status, type: String
-
1
embeds_one :activePeriod, class_name:'FHIR::Period'
-
1
embeds_one :currency, class_name:'FHIR::Coding'
-
1
embeds_one :balance, class_name:'FHIR::Quantity'
-
1
embeds_one :coveragePeriod, class_name:'FHIR::Period'
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
embeds_one :owner, class_name:'FHIR::Reference'
-
1
field :description, type: String
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Address
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Address
-
-
-
1
VALID_CODES = {
-
use: [ 'home', 'work', 'temp', 'old' ],
-
fhirType: [ 'postal', 'physical', 'both' ]
-
}
-
-
1
field :use, type: String
-
1
field :fhirType, type: String
-
1
field :text, type: String
-
1
field :line, type: Array # Array of Strings
-
1
field :city, type: String
-
1
field :district, type: String
-
1
field :state, type: String
-
1
field :postalCode, type: String
-
1
field :country, type: String
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class AllergyIntolerance
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::AllergyIntolerance
-
-
1
SEARCH_PARAMS = [
-
'severity',
-
'date',
-
'identifier',
-
'manifestation',
-
'recorder',
-
'substance',
-
'criticality',
-
'reporter',
-
'type',
-
'onset',
-
'route',
-
'patient',
-
'category',
-
'last-date',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
substance: [ '160244002', '429625007', '409137002', '428607008' ],
-
criticality: [ 'CRITL', 'CRITH', 'CRITU' ],
-
category: [ 'food', 'medication', 'environment', 'other' ],
-
fhirType: [ 'allergy', 'intolerance' ],
-
status: [ 'active', 'unconfirmed', 'confirmed', 'inactive', 'resolved', 'refuted', 'entered-in-error' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec reaction
-
1
class AllergyIntoleranceReactionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
severity: [ 'mild', 'moderate', 'severe' ],
-
certainty: [ 'unlikely', 'likely', 'confirmed' ]
-
}
-
-
1
embeds_one :substance, class_name:'FHIR::CodeableConcept'
-
1
field :certainty, type: String
-
1
embeds_many :manifestation, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :manifestation
-
1
field :description, type: String
-
1
field :onset, type: String
-
1
validates :onset, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :severity, type: String
-
1
embeds_one :exposureRoute, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :note, class_name:'FHIR::Annotation'
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :onset, type: String
-
1
validates :onset, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :recordedDate, type: String
-
1
validates :recordedDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :recorder, class_name:'FHIR::Reference'
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
validates_presence_of :patient
-
1
embeds_one :reporter, class_name:'FHIR::Reference'
-
1
embeds_one :substance, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :substance
-
1
field :status, type: String
-
1
field :criticality, type: String
-
1
field :fhirType, type: String
-
1
field :category, type: String
-
1
field :lastOccurence, type: String
-
1
validates :lastOccurence, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :note, class_name:'FHIR::Annotation'
-
1
embeds_many :reaction, class_name:'FHIR::AllergyIntolerance::AllergyIntoleranceReactionComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Annotation
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Annotation
-
-
1
MULTIPLE_TYPES = {
-
author: [ 'authorReference', 'authorString' ]
-
}
-
-
1
embeds_one :authorReference, class_name:'FHIR::Reference'
-
1
field :authorString, type: String
-
1
field :time, type: String
-
1
validates :time, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :text, type: String
-
1
validates_presence_of :text
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Appointment
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Appointment
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'actor',
-
'identifier',
-
'practitioner',
-
'part-status',
-
'patient',
-
'location',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'proposed', 'pending', 'booked', 'arrived', 'fulfilled', 'cancelled', 'noshow' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec participant
-
1
class AppointmentParticipantComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
required: [ 'required', 'optional', 'information-only' ],
-
status: [ 'accepted', 'declined', 'tentative', 'needs-action' ]
-
}
-
-
1
embeds_many :fhirType, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :actor, class_name:'FHIR::Reference'
-
1
field :required, type: String
-
1
field :status, type: String
-
1
validates_presence_of :status
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :reason, class_name:'FHIR::CodeableConcept'
-
1
field :priority, type: Integer
-
1
field :description, type: String
-
1
field :start, type: String
-
1
validates :start, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
1
field :end, type: String
-
1
validates :end, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
1
field :minutesDuration, type: Integer
-
1
embeds_many :slot, class_name:'FHIR::Reference'
-
1
field :comment, type: String
-
1
embeds_many :participant, class_name:'FHIR::Appointment::AppointmentParticipantComponent'
-
1
validates_presence_of :participant
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class AppointmentResponse
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::AppointmentResponse
-
-
1
SEARCH_PARAMS = [
-
'actor',
-
'identifier',
-
'practitioner',
-
'part-status',
-
'patient',
-
'appointment',
-
'location'
-
]
-
-
1
VALID_CODES = {
-
participantStatus: [ 'accepted', 'declined', 'tentative', 'in-process', 'completed', 'needs-action' ]
-
}
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :appointment, class_name:'FHIR::Reference'
-
1
validates_presence_of :appointment
-
1
field :start, type: String
-
1
validates :start, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
1
field :end, type: String
-
1
validates :end, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
1
embeds_many :participantType, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :actor, class_name:'FHIR::Reference'
-
1
field :participantStatus, type: String
-
1
validates_presence_of :participantStatus
-
1
field :comment, type: String
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Attachment
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Attachment
-
-
1
field :contentType, type: String
-
1
field :language, type: String
-
1
field :data, type: String
-
1
field :url, type: String
-
1
field :size, type: Integer
-
1
field :fhirHash, type: String
-
1
field :title, type: String
-
1
field :creation, type: String
-
1
validates :creation, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class AuditEvent
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::AuditEvent
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'address',
-
'source',
-
'type',
-
'altid',
-
'participant',
-
'reference',
-
'site',
-
'subtype',
-
'identity',
-
'patient',
-
'object-type',
-
'name',
-
'action',
-
'user',
-
'desc',
-
'policy'
-
]
-
# This is an ugly hack to deal with embedded structures in the spec event
-
1
class AuditEventEventComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
subtype: [ '110120', '110121', '110122', '110123', '110124', '110125', '110126', '110127', '110128', '110129', '110130', '110131', '110132', '110133', '110134', '110135', '110136', '110137', '110138', '110139', '110140', '110141', '110142' ],
-
action: [ 'C', 'R', 'U', 'D', 'E' ],
-
fhirType: [ 'rest', '110100', '110101', '110102', '110103', '110104', '110105', '110106', '110107', '110108', '110109', '110110', '110111', '110112', '110113', '110114' ],
-
outcome: [ '0', '4', '8', '12' ]
-
}
-
-
1
embeds_one :fhirType, class_name:'FHIR::Coding'
-
1
validates_presence_of :fhirType
-
1
embeds_many :subtype, class_name:'FHIR::Coding'
-
1
field :action, type: String
-
1
field :dateTime, type: String
-
1
validates :dateTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
1
validates_presence_of :dateTime
-
1
field :outcome, type: String
-
1
field :outcomeDesc, type: String
-
1
embeds_many :purposeOfEvent, class_name:'FHIR::Coding'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec network
-
1
class AuditEventParticipantNetworkComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirType: [ '1', '2', '3', '4', '5' ]
-
}
-
-
1
field :address, type: String
-
1
field :fhirType, type: String
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec participant
-
1
class AuditEventParticipantComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
role: [ '110150', '110151', '110152', '110153', '110154', '110155' ],
-
media: [ '110030', '110031', '110032', '110033', '110034', '110035', '110036', '110037', '110010', '110038' ]
-
}
-
-
1
embeds_many :role, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :reference, class_name:'FHIR::Reference'
-
1
embeds_one :userId, class_name:'FHIR::Identifier'
-
1
field :altId, type: String
-
1
field :name, type: String
-
1
field :requestor, type: Boolean
-
1
validates_presence_of :requestor
-
1
embeds_one :location, class_name:'FHIR::Reference'
-
1
field :policy, type: Array # Array of Strings
-
1
embeds_one :media, class_name:'FHIR::Coding'
-
1
embeds_one :network, class_name:'FHIR::AuditEvent::AuditEventParticipantNetworkComponent'
-
1
embeds_many :purposeOfUse, class_name:'FHIR::Coding'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec source
-
1
class AuditEventSourceComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirType: [ '1', '2', '3', '4', '5', '6', '7', '8', '9' ]
-
}
-
-
1
field :site, type: String
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
validates_presence_of :identifier
-
1
embeds_many :fhirType, class_name:'FHIR::Coding'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec detail
-
1
class AuditEventObjectDetailComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :fhirType, type: String
-
1
validates_presence_of :fhirType
-
1
field :value, type: String
-
1
validates_presence_of :value
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec object
-
1
class AuditEventObjectComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
lifecycle: [ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15' ],
-
role: [ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24' ],
-
fhirType: [ '1', '2', '3', '4' ]
-
}
-
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :reference, class_name:'FHIR::Reference'
-
1
embeds_one :fhirType, class_name:'FHIR::Coding'
-
1
embeds_one :role, class_name:'FHIR::Coding'
-
1
embeds_one :lifecycle, class_name:'FHIR::Coding'
-
1
embeds_many :securityLabel, class_name:'FHIR::Coding'
-
1
field :name, type: String
-
1
field :description, type: String
-
1
field :query, type: String
-
1
embeds_many :detail, class_name:'FHIR::AuditEvent::AuditEventObjectDetailComponent'
-
end
-
-
1
embeds_one :event, class_name:'FHIR::AuditEvent::AuditEventEventComponent'
-
1
validates_presence_of :event
-
1
embeds_many :participant, class_name:'FHIR::AuditEvent::AuditEventParticipantComponent'
-
1
validates_presence_of :participant
-
1
embeds_one :source, class_name:'FHIR::AuditEvent::AuditEventSourceComponent'
-
1
validates_presence_of :source
-
1
embeds_many :object, class_name:'FHIR::AuditEvent::AuditEventObjectComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Basic
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Basic
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'code',
-
'subject',
-
'created',
-
'patient',
-
'author'
-
]
-
-
1
VALID_CODES = {
-
code: [ 'consent', 'referral', 'advevent', 'aptmtreq', 'transfer', 'diet', 'adminact', 'exposure', 'investigation', 'account', 'invoice', 'adjudicat', 'predetreq', 'predetermine', 'study', 'protocol' ]
-
}
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :code
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
embeds_one :author, class_name:'FHIR::Reference'
-
1
field :created, type: String
-
1
validates :created, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Binary
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Binary
-
-
1
SEARCH_PARAMS = [
-
'contenttype'
-
]
-
1
field :contentType, type: String
-
1
validates_presence_of :contentType
-
1
field :content, type: String
-
1
validates_presence_of :content
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class BodySite
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::BodySite
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'code',
-
'patient'
-
]
-
-
1
VALID_CODES = {
-
fhirModifier: [ '419161000', '419465000', '51440002', '261183002', '261122009', '255561001', '49370004', '264217000', '261089000', '255551008', '351726001', '352730000' ]
-
}
-
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
validates_presence_of :patient
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :fhirModifier, class_name:'FHIR::CodeableConcept'
-
1
field :description, type: String
-
1
embeds_many :image, class_name:'FHIR::Attachment'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Bundle
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Bundle
-
-
1
SEARCH_PARAMS = [
-
'composition',
-
'type',
-
'message'
-
]
-
-
1
VALID_CODES = {
-
fhirType: [ 'document', 'message', 'transaction', 'transaction-response', 'batch', 'batch-response', 'history', 'searchset', 'collection' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec link
-
1
class BundleLinkComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :relation, type: String
-
1
validates_presence_of :relation
-
1
field :url, type: String
-
1
validates_presence_of :url
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec search
-
1
class BundleEntrySearchComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
mode: [ 'match', 'include', 'outcome' ]
-
}
-
-
1
field :mode, type: String
-
1
field :score, type: Float
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec request
-
1
class BundleEntryRequestComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
method: [ 'GET', 'POST', 'PUT', 'DELETE' ]
-
}
-
-
1
field :method, type: String
-
1
validates_presence_of :method
-
1
field :url, type: String
-
1
validates_presence_of :url
-
1
field :ifNoneMatch, type: String
-
1
field :ifModifiedSince, type: String
-
1
validates :ifModifiedSince, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
1
field :ifMatch, type: String
-
1
field :ifNoneExist, type: String
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec response
-
1
class BundleEntryResponseComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
field :location, type: String
-
1
field :etag, type: String
-
1
field :lastModified, type: String
-
1
validates :lastModified, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec entry
-
1
class BundleEntryComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_many :link, class_name:'FHIR::Bundle::BundleLinkComponent'
-
1
field :fullUrl, type: String
-
1
field :resourceType, type: String
-
1
attr_accessor :resource
-
# field :resource, type: FHIR::AnyType
-
1
embeds_one :search, class_name:'FHIR::Bundle::BundleEntrySearchComponent'
-
1
embeds_one :request, class_name:'FHIR::Bundle::BundleEntryRequestComponent'
-
1
embeds_one :response, class_name:'FHIR::Bundle::BundleEntryResponseComponent'
-
end
-
-
1
field :fhirType, type: String
-
1
validates_presence_of :fhirType
-
1
field :total, type: Integer
-
1
embeds_many :link, class_name:'FHIR::Bundle::BundleLinkComponent'
-
1
embeds_many :entry, class_name:'FHIR::Bundle::BundleEntryComponent'
-
1
embeds_one :signature, class_name:'FHIR::Signature'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class CarePlan
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::CarePlan
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'activitycode',
-
'activitydate',
-
'activityreference',
-
'performer',
-
'goal',
-
'subject',
-
'relatedcode',
-
'participant',
-
'relatedplan',
-
'condition',
-
'related',
-
'patient'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'proposed', 'draft', 'active', 'completed', 'cancelled' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec relatedPlan
-
1
class CarePlanRelatedPlanComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
code: [ 'includes', 'replaces', 'fulfills' ]
-
}
-
-
1
field :code, type: String
-
1
embeds_one :plan, class_name:'FHIR::Reference'
-
1
validates_presence_of :plan
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec participant
-
1
class CarePlanParticipantComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :role, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :member, class_name:'FHIR::Reference'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec detail
-
1
class CarePlanActivityDetailComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
category: [ 'diet', 'drug', 'encounter', 'observation', 'procedure', 'supply', 'other' ],
-
status: [ 'not-started', 'scheduled', 'in-progress', 'on-hold', 'completed', 'cancelled' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
product: [ 'productCodeableConcept', 'productReference' ],
-
scheduled: [ 'scheduledTiming', 'scheduledPeriod', 'scheduledString' ]
-
}
-
-
1
embeds_one :category, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :reasonCode, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :reasonReference, class_name:'FHIR::Reference'
-
1
embeds_many :goal, class_name:'FHIR::Reference'
-
1
field :status, type: String
-
1
embeds_one :statusReason, class_name:'FHIR::CodeableConcept'
-
1
field :prohibited, type: Boolean
-
1
validates_presence_of :prohibited
-
1
embeds_one :scheduledTiming, class_name:'FHIR::Timing'
-
1
embeds_one :scheduledPeriod, class_name:'FHIR::Period'
-
1
field :scheduledString, type: String
-
1
embeds_one :location, class_name:'FHIR::Reference'
-
1
embeds_many :performer, class_name:'FHIR::Reference'
-
1
embeds_one :productCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :productReference, class_name:'FHIR::Reference'
-
1
embeds_one :dailyAmount, class_name:'FHIR::Quantity'
-
1
embeds_one :quantity, class_name:'FHIR::Quantity'
-
1
field :description, type: String
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec activity
-
1
class CarePlanActivityComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_many :actionResulting, class_name:'FHIR::Reference'
-
1
embeds_many :progress, class_name:'FHIR::Annotation'
-
1
embeds_one :reference, class_name:'FHIR::Reference'
-
1
embeds_one :detail, class_name:'FHIR::CarePlan::CarePlanActivityDetailComponent'
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
embeds_one :context, class_name:'FHIR::Reference'
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
embeds_many :author, class_name:'FHIR::Reference'
-
1
field :modified, type: String
-
1
validates :modified, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_many :category, class_name:'FHIR::CodeableConcept'
-
1
field :description, type: String
-
1
embeds_many :addresses, class_name:'FHIR::Reference'
-
1
embeds_many :support, class_name:'FHIR::Reference'
-
1
embeds_many :relatedPlan, class_name:'FHIR::CarePlan::CarePlanRelatedPlanComponent'
-
1
embeds_many :participant, class_name:'FHIR::CarePlan::CarePlanParticipantComponent'
-
1
embeds_many :goal, class_name:'FHIR::Reference'
-
1
embeds_many :activity, class_name:'FHIR::CarePlan::CarePlanActivityComponent'
-
1
embeds_one :note, class_name:'FHIR::Annotation'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Claim
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Claim
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'provider',
-
'use',
-
'patient',
-
'priority'
-
]
-
-
1
VALID_CODES = {
-
exception: [ 'student', 'disabled' ],
-
condition: [ '123987' ],
-
additionalMaterials: [ 'xray', 'image', 'email', 'model', 'document', 'other' ],
-
fundsReserve: [ 'patient', 'provider', 'none' ],
-
interventionException: [ 'unknown', 'other' ],
-
use: [ 'complete', 'proposed', 'exploratory', 'other' ],
-
ruleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
originalRuleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
priority: [ 'stat', 'normal', 'deferred' ],
-
fhirType: [ 'institutional', 'oral', 'pharmacy', 'professional', 'vision' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec payee
-
1
class PayeeComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirType: [ 'subscriber', 'provider', 'other' ]
-
}
-
-
1
embeds_one :fhirType, class_name:'FHIR::Coding'
-
1
embeds_one :provider, class_name:'FHIR::Reference'
-
1
embeds_one :organization, class_name:'FHIR::Reference'
-
1
embeds_one :person, class_name:'FHIR::Reference'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec diagnosis
-
1
class DiagnosisComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
diagnosis: [ '123456', '123457', '987654', '123987', '112233', '997755', '321789' ]
-
}
-
-
1
field :sequence, type: Integer
-
1
validates_presence_of :sequence
-
1
embeds_one :diagnosis, class_name:'FHIR::Coding'
-
1
validates_presence_of :diagnosis
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec coverage
-
1
class CoverageComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
originalRuleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
relationship: [ '1', '2', '3', '4', '5' ]
-
}
-
-
1
field :sequence, type: Integer
-
1
validates_presence_of :sequence
-
1
field :focal, type: Boolean
-
1
validates_presence_of :focal
-
1
embeds_one :coverage, class_name:'FHIR::Reference'
-
1
validates_presence_of :coverage
-
1
field :businessArrangement, type: String
-
1
embeds_one :relationship, class_name:'FHIR::Coding'
-
1
validates_presence_of :relationship
-
1
field :preAuthRef, type: Array # Array of Strings
-
1
embeds_one :claimResponse, class_name:'FHIR::Reference'
-
1
embeds_one :originalRuleset, class_name:'FHIR::Coding'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec subDetail
-
1
class SubDetailComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
service: [ '1101', '1102', '1103', '1201', '1205', '2101', '2102', '2141', '2601', '11101', '11102', '11103', '11104', '21211', '21212', '27211', '99111', '99333', '99555' ],
-
udi: [ '{01}123456789' ]
-
}
-
-
1
field :sequence, type: Integer
-
1
validates_presence_of :sequence
-
1
embeds_one :fhirType, class_name:'FHIR::Coding'
-
1
validates_presence_of :fhirType
-
1
embeds_one :service, class_name:'FHIR::Coding'
-
1
validates_presence_of :service
-
1
embeds_one :quantity, class_name:'FHIR::Quantity'
-
1
embeds_one :unitPrice, class_name:'FHIR::Quantity'
-
1
field :factor, type: Float
-
1
field :points, type: Float
-
1
embeds_one :net, class_name:'FHIR::Quantity'
-
1
embeds_one :udi, class_name:'FHIR::Coding'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec detail
-
1
class DetailComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
service: [ '1101', '1102', '1103', '1201', '1205', '2101', '2102', '2141', '2601', '11101', '11102', '11103', '11104', '21211', '21212', '27211', '99111', '99333', '99555' ],
-
udi: [ '{01}123456789' ]
-
}
-
-
1
field :sequence, type: Integer
-
1
validates_presence_of :sequence
-
1
embeds_one :fhirType, class_name:'FHIR::Coding'
-
1
validates_presence_of :fhirType
-
1
embeds_one :service, class_name:'FHIR::Coding'
-
1
validates_presence_of :service
-
1
embeds_one :quantity, class_name:'FHIR::Quantity'
-
1
embeds_one :unitPrice, class_name:'FHIR::Quantity'
-
1
field :factor, type: Float
-
1
field :points, type: Float
-
1
embeds_one :net, class_name:'FHIR::Quantity'
-
1
embeds_one :udi, class_name:'FHIR::Coding'
-
1
embeds_many :subDetail, class_name:'FHIR::Claim::SubDetailComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec prosthesis
-
1
class ProsthesisComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
priorMaterial: [ '1', '2', '3', '4' ]
-
}
-
-
1
field :initial, type: Boolean
-
1
field :priorDate, type: String
-
1
validates :priorDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
1
embeds_one :priorMaterial, class_name:'FHIR::Coding'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec item
-
1
class ItemsComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirModifier: [ 'A', 'B', 'C', 'E', 'X' ],
-
bodySite: [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '11', '12', '13', '14', '15', '16', '17', '18', '21', '22', '23', '24', '25', '26', '27', '28', '31', '32', '33', '34', '35', '36', '37', '38', '41', '42', '43', '44', '45', '46', '47', '48' ],
-
service: [ '1101', '1102', '1103', '1201', '1205', '2101', '2102', '2141', '2601', '11101', '11102', '11103', '11104', '21211', '21212', '27211', '99111', '99333', '99555' ],
-
subSite: [ 'M', 'O', 'I', 'D', 'B', 'V', 'L', 'MO', 'DO', 'DI', 'MOD' ],
-
udi: [ '{01}123456789' ]
-
}
-
-
1
field :sequence, type: Integer
-
1
validates_presence_of :sequence
-
1
embeds_one :fhirType, class_name:'FHIR::Coding'
-
1
validates_presence_of :fhirType
-
1
embeds_one :provider, class_name:'FHIR::Reference'
-
1
field :diagnosisLinkId, type: Array # Array of Integers
-
1
embeds_one :service, class_name:'FHIR::Coding'
-
1
validates_presence_of :service
-
1
field :serviceDate, type: String
-
1
validates :serviceDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
1
embeds_one :quantity, class_name:'FHIR::Quantity'
-
1
embeds_one :unitPrice, class_name:'FHIR::Quantity'
-
1
field :factor, type: Float
-
1
field :points, type: Float
-
1
embeds_one :net, class_name:'FHIR::Quantity'
-
1
embeds_one :udi, class_name:'FHIR::Coding'
-
1
embeds_one :bodySite, class_name:'FHIR::Coding'
-
1
embeds_many :subSite, class_name:'FHIR::Coding'
-
1
embeds_many :fhirModifier, class_name:'FHIR::Coding'
-
1
embeds_many :detail, class_name:'FHIR::Claim::DetailComponent'
-
1
embeds_one :prosthesis, class_name:'FHIR::Claim::ProsthesisComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec missingTeeth
-
1
class MissingTeethComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
reason: [ 'E', 'C', 'U', 'O' ],
-
tooth: [ '11', '12', '13', '14', '15', '16', '17', '18', '21', '22', '23', '24', '25', '26', '27', '28', '31', '32', '33', '34', '35', '36', '37', '38', '41', '42', '43', '44', '45', '46', '47', '48' ]
-
}
-
-
1
embeds_one :tooth, class_name:'FHIR::Coding'
-
1
validates_presence_of :tooth
-
1
embeds_one :reason, class_name:'FHIR::Coding'
-
1
field :extractionDate, type: String
-
1
validates :extractionDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
end
-
-
1
field :fhirType, type: String
-
1
validates_presence_of :fhirType
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :ruleset, class_name:'FHIR::Coding'
-
1
embeds_one :originalRuleset, class_name:'FHIR::Coding'
-
1
field :created, type: String
-
1
validates :created, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :target, class_name:'FHIR::Reference'
-
1
embeds_one :provider, class_name:'FHIR::Reference'
-
1
embeds_one :organization, class_name:'FHIR::Reference'
-
1
field :use, type: String
-
1
embeds_one :priority, class_name:'FHIR::Coding'
-
1
embeds_one :fundsReserve, class_name:'FHIR::Coding'
-
1
embeds_one :enterer, class_name:'FHIR::Reference'
-
1
embeds_one :facility, class_name:'FHIR::Reference'
-
1
embeds_one :prescription, class_name:'FHIR::Reference'
-
1
embeds_one :originalPrescription, class_name:'FHIR::Reference'
-
1
embeds_one :payee, class_name:'FHIR::Claim::PayeeComponent'
-
1
embeds_one :referral, class_name:'FHIR::Reference'
-
1
embeds_many :diagnosis, class_name:'FHIR::Claim::DiagnosisComponent'
-
1
embeds_many :condition, class_name:'FHIR::Coding'
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
validates_presence_of :patient
-
1
embeds_many :coverage, class_name:'FHIR::Claim::CoverageComponent'
-
1
embeds_many :exception, class_name:'FHIR::Coding'
-
1
field :school, type: String
-
1
field :accident, type: String
-
1
validates :accident, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
1
embeds_one :accidentType, class_name:'FHIR::Coding'
-
1
embeds_many :interventionException, class_name:'FHIR::Coding'
-
1
embeds_many :item, class_name:'FHIR::Claim::ItemsComponent'
-
1
embeds_many :additionalMaterials, class_name:'FHIR::Coding'
-
1
embeds_many :missingTeeth, class_name:'FHIR::Claim::MissingTeethComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class ClaimResponse
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::ClaimResponse
-
-
1
SEARCH_PARAMS = [
-
'identifier'
-
]
-
-
1
VALID_CODES = {
-
form: [ '1', '2' ],
-
reserved: [ 'patient', 'provider', 'none' ],
-
payeeType: [ 'subscriber', 'provider', 'other' ],
-
ruleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
originalRuleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
paymentAdjustmentReason: [ 'A001', 'A002' ],
-
outcome: [ 'complete', 'error' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec adjudication
-
1
class ItemAdjudicationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
code: [ 'total', 'copay', 'eligible', 'deductable', 'eligpercent', 'tax', 'benefit' ]
-
}
-
-
1
embeds_one :code, class_name:'FHIR::Coding'
-
1
validates_presence_of :code
-
1
embeds_one :amount, class_name:'FHIR::Quantity'
-
1
field :value, type: Float
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec adjudication
-
1
class DetailAdjudicationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
code: [ 'total', 'copay', 'eligible', 'deductable', 'eligpercent', 'tax', 'benefit' ]
-
}
-
-
1
embeds_one :code, class_name:'FHIR::Coding'
-
1
validates_presence_of :code
-
1
embeds_one :amount, class_name:'FHIR::Quantity'
-
1
field :value, type: Float
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec adjudication
-
1
class SubdetailAdjudicationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
code: [ 'total', 'copay', 'eligible', 'deductable', 'eligpercent', 'tax', 'benefit' ]
-
}
-
-
1
embeds_one :code, class_name:'FHIR::Coding'
-
1
validates_presence_of :code
-
1
embeds_one :amount, class_name:'FHIR::Quantity'
-
1
field :value, type: Float
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec subDetail
-
1
class SubDetailComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :sequenceLinkId, type: Integer
-
1
validates_presence_of :sequenceLinkId
-
1
embeds_many :adjudication, class_name:'FHIR::ClaimResponse::SubdetailAdjudicationComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec detail
-
1
class ItemDetailComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :sequenceLinkId, type: Integer
-
1
validates_presence_of :sequenceLinkId
-
1
embeds_many :adjudication, class_name:'FHIR::ClaimResponse::DetailAdjudicationComponent'
-
1
embeds_many :subDetail, class_name:'FHIR::ClaimResponse::SubDetailComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec item
-
1
class ItemsComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :sequenceLinkId, type: Integer
-
1
validates_presence_of :sequenceLinkId
-
1
field :noteNumber, type: Array # Array of Integers
-
1
embeds_many :adjudication, class_name:'FHIR::ClaimResponse::ItemAdjudicationComponent'
-
1
embeds_many :detail, class_name:'FHIR::ClaimResponse::ItemDetailComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec adjudication
-
1
class AddedItemAdjudicationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
code: [ 'total', 'copay', 'eligible', 'deductable', 'eligpercent', 'tax', 'benefit' ]
-
}
-
-
1
embeds_one :code, class_name:'FHIR::Coding'
-
1
validates_presence_of :code
-
1
embeds_one :amount, class_name:'FHIR::Quantity'
-
1
field :value, type: Float
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec adjudication
-
1
class AddedItemDetailAdjudicationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
code: [ 'total', 'copay', 'eligible', 'deductable', 'eligpercent', 'tax', 'benefit' ]
-
}
-
-
1
embeds_one :code, class_name:'FHIR::Coding'
-
1
validates_presence_of :code
-
1
embeds_one :amount, class_name:'FHIR::Quantity'
-
1
field :value, type: Float
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec detail
-
1
class AddedItemsDetailComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :service, class_name:'FHIR::Coding'
-
1
validates_presence_of :service
-
1
embeds_one :fee, class_name:'FHIR::Quantity'
-
1
embeds_many :adjudication, class_name:'FHIR::ClaimResponse::AddedItemDetailAdjudicationComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec addItem
-
1
class AddedItemComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :sequenceLinkId, type: Array # Array of Integers
-
1
embeds_one :service, class_name:'FHIR::Coding'
-
1
validates_presence_of :service
-
1
embeds_one :fee, class_name:'FHIR::Quantity'
-
1
field :noteNumberLinkId, type: Array # Array of Integers
-
1
embeds_many :adjudication, class_name:'FHIR::ClaimResponse::AddedItemAdjudicationComponent'
-
1
embeds_many :detail, class_name:'FHIR::ClaimResponse::AddedItemsDetailComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec error
-
1
class ErrorsComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
code: [ 'A001', 'A002' ]
-
}
-
-
1
field :sequenceLinkId, type: Integer
-
1
field :detailSequenceLinkId, type: Integer
-
1
field :subdetailSequenceLinkId, type: Integer
-
1
embeds_one :code, class_name:'FHIR::Coding'
-
1
validates_presence_of :code
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec note
-
1
class NotesComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirType: [ 'display', 'print', 'printoper' ]
-
}
-
-
1
field :number, type: Integer
-
1
embeds_one :fhirType, class_name:'FHIR::Coding'
-
1
field :text, type: String
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec coverage
-
1
class CoverageComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
originalRuleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
relationship: [ '1', '2', '3', '4', '5' ]
-
}
-
-
1
field :sequence, type: Integer
-
1
validates_presence_of :sequence
-
1
field :focal, type: Boolean
-
1
validates_presence_of :focal
-
1
embeds_one :coverage, class_name:'FHIR::Reference'
-
1
validates_presence_of :coverage
-
1
field :businessArrangement, type: String
-
1
embeds_one :relationship, class_name:'FHIR::Coding'
-
1
validates_presence_of :relationship
-
1
field :preAuthRef, type: Array # Array of Strings
-
1
embeds_one :claimResponse, class_name:'FHIR::Reference'
-
1
embeds_one :originalRuleset, class_name:'FHIR::Coding'
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :request, class_name:'FHIR::Reference'
-
1
embeds_one :ruleset, class_name:'FHIR::Coding'
-
1
embeds_one :originalRuleset, class_name:'FHIR::Coding'
-
1
field :created, type: String
-
1
validates :created, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :organization, class_name:'FHIR::Reference'
-
1
embeds_one :requestProvider, class_name:'FHIR::Reference'
-
1
embeds_one :requestOrganization, class_name:'FHIR::Reference'
-
1
field :outcome, type: String
-
1
validates :outcome, :inclusion => { in: VALID_CODES[:outcome], :allow_nil => true }
-
1
field :disposition, type: String
-
1
embeds_one :payeeType, class_name:'FHIR::Coding'
-
1
embeds_many :item, class_name:'FHIR::ClaimResponse::ItemsComponent'
-
1
embeds_many :addItem, class_name:'FHIR::ClaimResponse::AddedItemComponent'
-
1
embeds_many :error, class_name:'FHIR::ClaimResponse::ErrorsComponent'
-
1
embeds_one :totalCost, class_name:'FHIR::Quantity'
-
1
embeds_one :unallocDeductable, class_name:'FHIR::Quantity'
-
1
embeds_one :totalBenefit, class_name:'FHIR::Quantity'
-
1
embeds_one :paymentAdjustment, class_name:'FHIR::Quantity'
-
1
embeds_one :paymentAdjustmentReason, class_name:'FHIR::Coding'
-
1
field :paymentDate, type: String
-
1
validates :paymentDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
1
embeds_one :paymentAmount, class_name:'FHIR::Quantity'
-
1
embeds_one :paymentRef, class_name:'FHIR::Identifier'
-
1
embeds_one :reserved, class_name:'FHIR::Coding'
-
1
embeds_one :form, class_name:'FHIR::Coding'
-
1
embeds_many :note, class_name:'FHIR::ClaimResponse::NotesComponent'
-
1
embeds_many :coverage, class_name:'FHIR::ClaimResponse::CoverageComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class ClinicalImpression
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::ClinicalImpression
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'previous',
-
'assessor',
-
'trigger',
-
'finding',
-
'ruledout',
-
'problem',
-
'patient',
-
'investigation',
-
'action',
-
'trigger-code',
-
'plan',
-
'resolved',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'in-progress', 'completed', 'entered-in-error' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
trigger: [ 'triggerCodeableConcept', 'triggerReference' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec investigations
-
1
class ClinicalImpressionInvestigationsComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
code: [ '271336007', '160237006' ]
-
}
-
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :code
-
1
embeds_many :item, class_name:'FHIR::Reference'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec finding
-
1
class ClinicalImpressionFindingComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :item, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :item
-
1
field :cause, type: String
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec ruledOut
-
1
class ClinicalImpressionRuledOutComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :item, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :item
-
1
field :reason, type: String
-
end
-
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
validates_presence_of :patient
-
1
embeds_one :assessor, class_name:'FHIR::Reference'
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :description, type: String
-
1
embeds_one :previous, class_name:'FHIR::Reference'
-
1
embeds_many :problem, class_name:'FHIR::Reference'
-
1
embeds_one :triggerCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :triggerReference, class_name:'FHIR::Reference'
-
1
embeds_many :investigations, class_name:'FHIR::ClinicalImpression::ClinicalImpressionInvestigationsComponent'
-
1
field :protocol, type: String
-
1
field :summary, type: String
-
1
embeds_many :finding, class_name:'FHIR::ClinicalImpression::ClinicalImpressionFindingComponent'
-
1
embeds_many :resolved, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :ruledOut, class_name:'FHIR::ClinicalImpression::ClinicalImpressionRuledOutComponent'
-
1
field :prognosis, type: String
-
1
embeds_many :plan, class_name:'FHIR::Reference'
-
1
embeds_many :action, class_name:'FHIR::Reference'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class CodeableConcept
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::CodeableConcept
-
-
1
embeds_many :coding, class_name:'FHIR::Coding'
-
1
field :text, type: String
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Coding
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Coding
-
-
1
field :system, type: String
-
1
field :versionNum, type: String
-
1
field :code, type: String
-
1
field :display, type: String
-
1
field :userSelected, type: Boolean
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Communication
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Communication
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'request',
-
'sender',
-
'subject',
-
'patient',
-
'recipient',
-
'received',
-
'medium',
-
'encounter',
-
'category',
-
'sent',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'in-progress', 'completed', 'suspended', 'rejected', 'failed' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec payload
-
1
class CommunicationPayloadComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
content: [ 'contentString', 'contentAttachment', 'contentReference' ]
-
}
-
-
1
field :contentString, type: String
-
1
validates_presence_of :contentString
-
1
embeds_one :contentAttachment, class_name:'FHIR::Attachment'
-
1
validates_presence_of :contentAttachment
-
1
embeds_one :contentReference, class_name:'FHIR::Reference'
-
1
validates_presence_of :contentReference
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :category, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :sender, class_name:'FHIR::Reference'
-
1
embeds_many :recipient, class_name:'FHIR::Reference'
-
1
embeds_many :payload, class_name:'FHIR::Communication::CommunicationPayloadComponent'
-
1
embeds_many :medium, class_name:'FHIR::CodeableConcept'
-
1
field :status, type: String
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
field :sent, type: String
-
1
validates :sent, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :received, type: String
-
1
validates :received, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_many :reason, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
embeds_one :requestDetail, class_name:'FHIR::Reference'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class CommunicationRequest
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::CommunicationRequest
-
-
1
SEARCH_PARAMS = [
-
'requester',
-
'identifier',
-
'subject',
-
'medium',
-
'encounter',
-
'priority',
-
'requested',
-
'sender',
-
'patient',
-
'recipient',
-
'time',
-
'category',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'proposed', 'planned', 'requested', 'received', 'accepted', 'in-progress', 'completed', 'suspended', 'rejected', 'failed' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
scheduled: [ 'scheduledDateTime', 'scheduledPeriod' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec payload
-
1
class CommunicationRequestPayloadComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
content: [ 'contentString', 'contentAttachment', 'contentReference' ]
-
}
-
-
1
field :contentString, type: String
-
1
validates_presence_of :contentString
-
1
embeds_one :contentAttachment, class_name:'FHIR::Attachment'
-
1
validates_presence_of :contentAttachment
-
1
embeds_one :contentReference, class_name:'FHIR::Reference'
-
1
validates_presence_of :contentReference
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :category, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :sender, class_name:'FHIR::Reference'
-
1
embeds_many :recipient, class_name:'FHIR::Reference'
-
1
embeds_many :payload, class_name:'FHIR::CommunicationRequest::CommunicationRequestPayloadComponent'
-
1
embeds_many :medium, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :requester, class_name:'FHIR::Reference'
-
1
field :status, type: String
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
field :scheduledDateTime, type: String
-
1
validates :scheduledDateTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :scheduledPeriod, class_name:'FHIR::Period'
-
1
embeds_many :reason, class_name:'FHIR::CodeableConcept'
-
1
field :requestedOn, type: String
-
1
validates :requestedOn, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
embeds_one :priority, class_name:'FHIR::CodeableConcept'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Composition
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Composition
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'identifier',
-
'period',
-
'subject',
-
'author',
-
'confidentiality',
-
'section',
-
'encounter',
-
'type',
-
'title',
-
'attester',
-
'entry',
-
'patient',
-
'context',
-
'class',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
fhirClass: [ 'LP173387-4', 'LP173388-2', 'LP173389-0', 'LP173390-8', 'LP173394-0', 'LP173403-9', 'LP193873-9', 'LP173404-7', 'LP173405-4', 'LP173406-2', 'LP173407-0', 'LP181089-6', 'LP173409-6', 'LP173410-4', 'LP173412-0', 'LP173413-8', 'LP173414-6', 'LP173415-3', 'LP181112-6', 'LP181116-7', 'LP181119-1', 'LP173118-3', 'LP173416-1', 'LP173417-9', 'LP173418-7', 'LP173419-5', 'LP173420-3', 'LP181207-4', 'LP181204-1', 'LP156982-3', 'LP173421-1', 'LP183503-4', 'LP183502-6' ],
-
status: [ 'preliminary', 'final', 'amended', 'entered-in-error' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec attester
-
1
class CompositionAttesterComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
mode: [ 'personal', 'professional', 'legal', 'official' ]
-
}
-
-
1
field :mode, type: Array # Array of Strings
-
1
validates_presence_of :mode
-
1
field :time, type: String
-
1
validates :time, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :party, class_name:'FHIR::Reference'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec event
-
1
class CompositionEventComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_many :code, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
embeds_many :detail, class_name:'FHIR::Reference'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec section
-
1
class SectionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
code: [ '10154-3', '10157-6', '10160-0', '10164-2', '10183-2', '10184-0', '10187-3', '10210-3', '10216-0', '10218-6', '10218-6', '10223-6', '10830-8', '11329-0', '11348-0', '11369-6', '11450-4', '11493-4', '11535-2', '11537-8', '18776-5', '18841-7', '29299-5', '29545-1', '29549-3', '29554-3', '29762-2', '30954-2', '42344-2', '42346-7', '42348-3', '42349-1', '46240-8', '46241-6', '46264-8', '47420-5', '47519-4', '48765-2', '48768-6', '51848-0', '55109-3', '55122-6', '59768-2', '59769-0', '59770-8', '59771-6', '59772-4', '59773-2', '59775-7', '59776-5', '61149-1', '61150-9', '61150-9', '69730-0', '8648-8', '8653-8', '8716-3' ]
-
}
-
-
1
field :title, type: String
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :text, class_name:'FHIR::Narrative'
-
1
field :mode, type: String
-
1
embeds_one :orderedBy, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :entry, class_name:'FHIR::Reference'
-
1
embeds_one :emptyReason, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :section, class_name:'FHIR::Composition::SectionComponent'
-
end
-
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
validates_presence_of :date
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :fhirType
-
1
embeds_one :fhirClass, class_name:'FHIR::CodeableConcept'
-
1
field :title, type: String
-
1
validates_presence_of :title
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
field :confidentiality, type: String
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
validates_presence_of :subject
-
1
embeds_many :author, class_name:'FHIR::Reference'
-
1
validates_presence_of :author
-
1
embeds_many :attester, class_name:'FHIR::Composition::CompositionAttesterComponent'
-
1
embeds_one :custodian, class_name:'FHIR::Reference'
-
1
embeds_many :event, class_name:'FHIR::Composition::CompositionEventComponent'
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
embeds_many :section, class_name:'FHIR::Composition::SectionComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class ConceptMap
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::ConceptMap
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'identifier',
-
'product',
-
'dependson',
-
'description',
-
'targetsystem',
-
'source',
-
'version',
-
'sourcesystem',
-
'url',
-
'target',
-
'sourcecode',
-
'sourceuri',
-
'name',
-
'context',
-
'publisher',
-
'targetcode',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'draft', 'active', 'retired' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
source: [ 'sourceUri', 'sourceReference' ],
-
target: [ 'targetUri', 'targetReference' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec contact
-
1
class ConceptMapContactComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :name, type: String
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec dependsOn
-
1
class OtherElementComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :element, type: String
-
1
validates_presence_of :element
-
1
field :codeSystem, type: String
-
1
validates_presence_of :codeSystem
-
1
field :code, type: String
-
1
validates_presence_of :code
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec target
-
1
class TargetElementComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
equivalence: [ 'equivalent', 'equal', 'wider', 'subsumes', 'narrower', 'specializes', 'inexact', 'unmatched', 'disjoint' ]
-
}
-
-
1
field :codeSystem, type: String
-
1
field :code, type: String
-
1
field :equivalence, type: String
-
1
validates :equivalence, :inclusion => { in: VALID_CODES[:equivalence] }
-
1
validates_presence_of :equivalence
-
1
field :comments, type: String
-
1
embeds_many :dependsOn, class_name:'FHIR::ConceptMap::OtherElementComponent'
-
1
embeds_many :product, class_name:'FHIR::ConceptMap::OtherElementComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec element
-
1
class SourceElementComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :codeSystem, type: String
-
1
field :code, type: String
-
1
embeds_many :target, class_name:'FHIR::ConceptMap::TargetElementComponent'
-
end
-
-
1
field :url, type: String
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
field :versionNum, type: String
-
1
field :name, type: String
-
1
field :status, type: String
-
1
validates :status, :inclusion => { in: VALID_CODES[:status] }
-
1
validates_presence_of :status
-
1
field :experimental, type: Boolean
-
1
field :publisher, type: String
-
1
embeds_many :contact, class_name:'FHIR::ConceptMap::ConceptMapContactComponent'
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :description, type: String
-
1
embeds_many :useContext, class_name:'FHIR::CodeableConcept'
-
1
field :requirements, type: String
-
1
field :copyright, type: String
-
1
field :sourceUri, type: String
-
1
validates_presence_of :sourceUri
-
1
embeds_one :sourceReference, class_name:'FHIR::Reference'
-
1
validates_presence_of :sourceReference
-
1
field :targetUri, type: String
-
1
validates_presence_of :targetUri
-
1
embeds_one :targetReference, class_name:'FHIR::Reference'
-
1
validates_presence_of :targetReference
-
1
embeds_many :element, class_name:'FHIR::ConceptMap::SourceElementComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Condition
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Condition
-
-
1
SEARCH_PARAMS = [
-
'severity',
-
'identifier',
-
'clinicalstatus',
-
'onset-info',
-
'code',
-
'evidence',
-
'encounter',
-
'onset',
-
'asserter',
-
'date-recorded',
-
'stage',
-
'patient',
-
'category',
-
'body-site'
-
]
-
-
1
VALID_CODES = {
-
severity: [ '399166001', '24484000', '6736007', '255604002' ],
-
verificationStatus: [ 'provisional', 'differential', 'confirmed', 'refuted', 'entered-in-error', 'unknown' ],
-
category: [ 'complaint', 'symptom', 'finding', 'diagnosis' ],
-
clinicalStatus: [ 'active', 'relapse', 'remission', 'resolved' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
onset: [ 'onsetDateTime', 'onsetQuantity', 'onsetPeriod', 'onsetRange', 'onsetString' ],
-
abatement: [ 'abatementDateTime', 'abatementQuantity', 'abatementBoolean', 'abatementPeriod', 'abatementRange', 'abatementString' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec stage
-
1
class ConditionStageComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :summary, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :assessment, class_name:'FHIR::Reference'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec evidence
-
1
class ConditionEvidenceComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :detail, class_name:'FHIR::Reference'
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
validates_presence_of :patient
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
embeds_one :asserter, class_name:'FHIR::Reference'
-
1
field :dateRecorded, type: String
-
1
validates :dateRecorded, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :code
-
1
embeds_one :category, class_name:'FHIR::CodeableConcept'
-
1
field :clinicalStatus, type: String
-
1
field :verificationStatus, type: String
-
1
validates_presence_of :verificationStatus
-
1
embeds_one :severity, class_name:'FHIR::CodeableConcept'
-
1
field :onsetDateTime, type: String
-
1
validates :onsetDateTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :onsetQuantity, class_name:'FHIR::Quantity'
-
1
embeds_one :onsetPeriod, class_name:'FHIR::Period'
-
1
embeds_one :onsetRange, class_name:'FHIR::Range'
-
1
field :onsetString, type: String
-
1
field :abatementDateTime, type: String
-
1
validates :abatementDateTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :abatementQuantity, class_name:'FHIR::Quantity'
-
1
field :abatementBoolean, type: Boolean
-
1
embeds_one :abatementPeriod, class_name:'FHIR::Period'
-
1
embeds_one :abatementRange, class_name:'FHIR::Range'
-
1
field :abatementString, type: String
-
1
embeds_one :stage, class_name:'FHIR::Condition::ConditionStageComponent'
-
1
embeds_many :evidence, class_name:'FHIR::Condition::ConditionEvidenceComponent'
-
1
embeds_many :bodySite, class_name:'FHIR::CodeableConcept'
-
1
field :notes, type: String
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Conformance
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Conformance
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'software',
-
'resource',
-
'profile',
-
'format',
-
'description',
-
'fhirversion',
-
'version',
-
'url',
-
'supported-profile',
-
'mode',
-
'security',
-
'name',
-
'publisher',
-
'event',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
kind: [ 'instance', 'capability', 'requirements' ],
-
acceptUnknown: [ 'no', 'extensions', 'elements', 'both' ],
-
status: [ 'draft', 'active', 'retired' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec contact
-
1
class ConformanceContactComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :name, type: String
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec software
-
1
class ConformanceSoftwareComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :name, type: String
-
1
validates_presence_of :name
-
1
field :versionNum, type: String
-
1
field :releaseDate, type: String
-
1
validates :releaseDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec implementation
-
1
class ConformanceImplementationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :description, type: String
-
1
validates_presence_of :description
-
1
field :url, type: String
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec certificate
-
1
class ConformanceRestSecurityCertificateComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :fhirType, type: String
-
1
field :blob, type: String
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec security
-
1
class ConformanceRestSecurityComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
service: [ 'OAuth', 'SMART-on-FHIR', 'NTLM', 'Basic', 'Kerberos', 'Certificates' ]
-
}
-
-
1
field :cors, type: Boolean
-
1
embeds_many :service, class_name:'FHIR::CodeableConcept'
-
1
field :description, type: String
-
1
embeds_many :certificate, class_name:'FHIR::Conformance::ConformanceRestSecurityCertificateComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec interaction
-
1
class ResourceInteractionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
code: [ 'read', 'vread', 'update', 'delete', 'history-instance', 'validate', 'history-type', 'create', 'search-type' ]
-
}
-
-
1
field :code, type: String
-
1
validates_presence_of :code
-
1
field :documentation, type: String
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec searchParam
-
1
class ConformanceRestResourceSearchParamComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirModifier: [ 'missing', 'exact', 'contains', 'not', 'text', 'in', 'not-in', 'below', 'above', 'type' ],
-
fhirType: [ 'number', 'date', 'string', 'token', 'reference', 'composite', 'quantity', 'uri' ]
-
}
-
-
1
field :name, type: String
-
1
validates_presence_of :name
-
1
field :definition, type: String
-
1
field :fhirType, type: String
-
1
validates :fhirType, :inclusion => { in: VALID_CODES[:fhirType] }
-
1
validates_presence_of :fhirType
-
1
field :documentation, type: String
-
1
field :target, type: Array # Array of Strings
-
1
field :fhirModifier, type: Array # Array of Strings
-
1
field :chain, type: Array # Array of Strings
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec resource
-
1
class ConformanceRestResourceComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
versioning: [ 'no-version', 'versioned', 'versioned-update' ],
-
conditionalDelete: [ 'not-supported', 'single', 'multiple' ]
-
}
-
-
1
field :fhirType, type: String
-
1
validates_presence_of :fhirType
-
1
embeds_one :profile, class_name:'FHIR::Reference'
-
1
embeds_many :interaction, class_name:'FHIR::Conformance::ResourceInteractionComponent'
-
1
validates_presence_of :interaction
-
1
field :versioning, type: String
-
1
field :readHistory, type: Boolean
-
1
field :updateCreate, type: Boolean
-
1
field :conditionalCreate, type: Boolean
-
1
field :conditionalUpdate, type: Boolean
-
1
field :conditionalDelete, type: String
-
1
field :searchInclude, type: Array # Array of Strings
-
1
field :searchRevInclude, type: Array # Array of Strings
-
1
embeds_many :searchParam, class_name:'FHIR::Conformance::ConformanceRestResourceSearchParamComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec interaction
-
1
class SystemInteractionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
code: [ 'transaction', 'search-system', 'history-system' ]
-
}
-
-
1
field :code, type: String
-
1
validates_presence_of :code
-
1
field :documentation, type: String
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec operation
-
1
class ConformanceRestOperationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :name, type: String
-
1
validates_presence_of :name
-
1
embeds_one :definition, class_name:'FHIR::Reference'
-
1
validates_presence_of :definition
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec rest
-
1
class ConformanceRestComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
mode: [ 'client', 'server' ],
-
transactionMode: [ 'not-supported', 'batch', 'transaction', 'both' ]
-
}
-
-
1
field :mode, type: String
-
1
validates_presence_of :mode
-
1
field :documentation, type: String
-
1
embeds_one :security, class_name:'FHIR::Conformance::ConformanceRestSecurityComponent'
-
1
embeds_many :resource, class_name:'FHIR::Conformance::ConformanceRestResourceComponent'
-
1
validates_presence_of :resource
-
1
embeds_many :interaction, class_name:'FHIR::Conformance::SystemInteractionComponent'
-
1
field :transactionMode, type: String
-
1
embeds_many :searchParam, class_name:'FHIR::Conformance::ConformanceRestResourceSearchParamComponent'
-
1
embeds_many :operation, class_name:'FHIR::Conformance::ConformanceRestOperationComponent'
-
1
field :compartment, type: Array # Array of Strings
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec endpoint
-
1
class ConformanceMessagingEndpointComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
protocol: [ 'http', 'ftp', 'mllp' ]
-
}
-
-
1
embeds_one :protocol, class_name:'FHIR::Coding'
-
1
validates_presence_of :protocol
-
1
field :address, type: String
-
1
validates_presence_of :address
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec event
-
1
class ConformanceMessagingEventComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
mode: [ 'sender', 'receiver' ],
-
category: [ 'Consequence', 'Currency', 'Notification' ]
-
}
-
-
1
embeds_one :code, class_name:'FHIR::Coding'
-
1
validates_presence_of :code
-
1
field :category, type: String
-
1
field :mode, type: String
-
1
validates_presence_of :mode
-
1
field :focus, type: String
-
1
validates_presence_of :focus
-
1
embeds_one :request, class_name:'FHIR::Reference'
-
1
validates_presence_of :request
-
1
embeds_one :response, class_name:'FHIR::Reference'
-
1
validates_presence_of :response
-
1
field :documentation, type: String
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec messaging
-
1
class ConformanceMessagingComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_many :endpoint, class_name:'FHIR::Conformance::ConformanceMessagingEndpointComponent'
-
1
field :reliableCache, type: Integer
-
1
field :documentation, type: String
-
1
embeds_many :event, class_name:'FHIR::Conformance::ConformanceMessagingEventComponent'
-
1
validates_presence_of :event
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec document
-
1
class ConformanceDocumentComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
mode: [ 'producer', 'consumer' ]
-
}
-
-
1
field :mode, type: String
-
1
validates_presence_of :mode
-
1
field :documentation, type: String
-
1
embeds_one :profile, class_name:'FHIR::Reference'
-
1
validates_presence_of :profile
-
end
-
-
1
field :url, type: String
-
1
field :versionNum, type: String
-
1
field :name, type: String
-
1
field :status, type: String
-
1
validates :status, :inclusion => { in: VALID_CODES[:status], :allow_nil => true }
-
1
field :experimental, type: Boolean
-
1
field :publisher, type: String
-
1
embeds_many :contact, class_name:'FHIR::Conformance::ConformanceContactComponent'
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
validates_presence_of :date
-
1
field :description, type: String
-
1
field :requirements, type: String
-
1
field :copyright, type: String
-
1
field :kind, type: String
-
1
validates_presence_of :kind
-
1
embeds_one :software, class_name:'FHIR::Conformance::ConformanceSoftwareComponent'
-
1
embeds_one :implementation, class_name:'FHIR::Conformance::ConformanceImplementationComponent'
-
1
field :fhirVersion, type: String
-
1
validates_presence_of :fhirVersion
-
1
field :acceptUnknown, type: String
-
1
validates_presence_of :acceptUnknown
-
1
field :format, type: Array # Array of Strings
-
1
validates_presence_of :format
-
1
embeds_many :profile, class_name:'FHIR::Reference'
-
1
embeds_many :rest, class_name:'FHIR::Conformance::ConformanceRestComponent'
-
1
embeds_many :messaging, class_name:'FHIR::Conformance::ConformanceMessagingComponent'
-
1
embeds_many :document, class_name:'FHIR::Conformance::ConformanceDocumentComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class ContactPoint
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::ContactPoint
-
-
-
1
VALID_CODES = {
-
system: [ 'phone', 'fax', 'email', 'pager', 'other' ],
-
use: [ 'home', 'work', 'temp', 'old', 'mobile' ]
-
}
-
-
1
field :system, type: String
-
1
field :value, type: String
-
1
field :use, type: String
-
1
field :rank, type: Integer
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Contract
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Contract
-
-
1
SEARCH_PARAMS = [
-
'actor',
-
'identifier',
-
'subject',
-
'patient',
-
'signer'
-
]
-
-
1
VALID_CODES = {
-
action: [ 'action-a', 'action-b' ],
-
subType: [ 'disclosure-CA', 'disclosure-US' ],
-
fhirType: [ 'privacy', 'disclosure' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
binding: [ 'bindingAttachment', 'bindingReference' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec actor
-
1
class ActorComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
role: [ 'practitioner', 'patient' ]
-
}
-
-
1
embeds_one :entity, class_name:'FHIR::Reference'
-
1
validates_presence_of :entity
-
1
embeds_many :role, class_name:'FHIR::CodeableConcept'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec valuedItem
-
1
class ValuedItemComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
entity: [ 'entityCodeableConcept', 'entityReference' ]
-
}
-
-
1
embeds_one :entityCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :entityReference, class_name:'FHIR::Reference'
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
field :effectiveTime, type: String
-
1
validates :effectiveTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :quantity, class_name:'FHIR::Quantity'
-
1
embeds_one :unitPrice, class_name:'FHIR::Quantity'
-
1
field :factor, type: Float
-
1
field :points, type: Float
-
1
embeds_one :net, class_name:'FHIR::Quantity'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec signer
-
1
class SignatoryComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirType: [ '1.2.840.10065.1.12.1.1', '1.2.840.10065.1.12.1.2', '1.2.840.10065.1.12.1.3', '1.2.840.10065.1.12.1.4', '1.2.840.10065.1.12.1.5', '1.2.840.10065.1.12.1.6', '1.2.840.10065.1.12.1.7', '1.2.840.10065.1.12.1.8', '1.2.840.10065.1.12.1.9', '1.2.840.10065.1.12.1.10', '1.2.840.10065.1.12.1.11', '1.2.840.10065.1.12.1.12', '1.2.840.10065.1.12.1.13', '1.2.840.10065.1.12.1.14', '1.2.840.10065.1.12.1.15', '1.2.840.10065.1.12.1.16', '1.2.840.10065.1.12.1.17' ]
-
}
-
-
1
embeds_one :fhirType, class_name:'FHIR::Coding'
-
1
validates_presence_of :fhirType
-
1
embeds_one :party, class_name:'FHIR::Reference'
-
1
validates_presence_of :party
-
1
field :signature, type: String
-
1
validates_presence_of :signature
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec actor
-
1
class TermActorComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
role: [ 'practitioner', 'patient' ]
-
}
-
-
1
embeds_one :entity, class_name:'FHIR::Reference'
-
1
validates_presence_of :entity
-
1
embeds_many :role, class_name:'FHIR::CodeableConcept'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec valuedItem
-
1
class TermValuedItemComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
entity: [ 'entityCodeableConcept', 'entityReference' ]
-
}
-
-
1
embeds_one :entityCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :entityReference, class_name:'FHIR::Reference'
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
field :effectiveTime, type: String
-
1
validates :effectiveTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :quantity, class_name:'FHIR::Quantity'
-
1
embeds_one :unitPrice, class_name:'FHIR::Quantity'
-
1
field :factor, type: Float
-
1
field :points, type: Float
-
1
embeds_one :net, class_name:'FHIR::Quantity'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec term
-
1
class TermComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
action: [ 'action-a', 'action-b' ],
-
subType: [ 'OralHealth-Basic', 'OralHealth-Major', 'OralHealth-Orthodontic' ],
-
fhirType: [ 'OralHealth', 'Vision' ]
-
}
-
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
field :issued, type: String
-
1
validates :issued, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :applies, class_name:'FHIR::Period'
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :subType, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
embeds_many :action, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :actionReason, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :actor, class_name:'FHIR::Contract::TermActorComponent'
-
1
field :text, type: String
-
1
embeds_many :valuedItem, class_name:'FHIR::Contract::TermValuedItemComponent'
-
1
embeds_many :group, class_name:'FHIR::Contract::TermComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec friendly
-
1
class FriendlyLanguageComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
content: [ 'contentAttachment', 'contentReference' ]
-
}
-
-
1
embeds_one :contentAttachment, class_name:'FHIR::Attachment'
-
1
validates_presence_of :contentAttachment
-
1
embeds_one :contentReference, class_name:'FHIR::Reference'
-
1
validates_presence_of :contentReference
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec legal
-
1
class LegalLanguageComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
content: [ 'contentAttachment', 'contentReference' ]
-
}
-
-
1
embeds_one :contentAttachment, class_name:'FHIR::Attachment'
-
1
validates_presence_of :contentAttachment
-
1
embeds_one :contentReference, class_name:'FHIR::Reference'
-
1
validates_presence_of :contentReference
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec rule
-
1
class ComputableLanguageComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
content: [ 'contentAttachment', 'contentReference' ]
-
}
-
-
1
embeds_one :contentAttachment, class_name:'FHIR::Attachment'
-
1
validates_presence_of :contentAttachment
-
1
embeds_one :contentReference, class_name:'FHIR::Reference'
-
1
validates_presence_of :contentReference
-
end
-
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
field :issued, type: String
-
1
validates :issued, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :applies, class_name:'FHIR::Period'
-
1
embeds_many :subject, class_name:'FHIR::Reference'
-
1
embeds_many :authority, class_name:'FHIR::Reference'
-
1
embeds_many :domain, class_name:'FHIR::Reference'
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :subType, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :action, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :actionReason, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :actor, class_name:'FHIR::Contract::ActorComponent'
-
1
embeds_many :valuedItem, class_name:'FHIR::Contract::ValuedItemComponent'
-
1
embeds_many :signer, class_name:'FHIR::Contract::SignatoryComponent'
-
1
embeds_many :term, class_name:'FHIR::Contract::TermComponent'
-
1
embeds_one :bindingAttachment, class_name:'FHIR::Attachment'
-
1
embeds_one :bindingReference, class_name:'FHIR::Reference'
-
1
embeds_many :friendly, class_name:'FHIR::Contract::FriendlyLanguageComponent'
-
1
embeds_many :legal, class_name:'FHIR::Contract::LegalLanguageComponent'
-
1
embeds_many :rule, class_name:'FHIR::Contract::ComputableLanguageComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Coverage
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Coverage
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'sequence',
-
'subplan',
-
'type',
-
'plan',
-
'dependent',
-
'issuer',
-
'group'
-
]
-
1
embeds_one :issuer, class_name:'FHIR::Reference'
-
1
embeds_one :bin, class_name:'FHIR::Identifier'
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
embeds_one :fhirType, class_name:'FHIR::Coding'
-
1
embeds_one :subscriberId, class_name:'FHIR::Identifier'
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :group, type: String
-
1
field :plan, type: String
-
1
field :subPlan, type: String
-
1
field :dependent, type: Integer
-
1
field :sequence, type: Integer
-
1
embeds_one :subscriber, class_name:'FHIR::Reference'
-
1
embeds_one :network, class_name:'FHIR::Identifier'
-
1
embeds_many :contract, class_name:'FHIR::Reference'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class DataElement
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::DataElement
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'identifier',
-
'code',
-
'stringency',
-
'name',
-
'context',
-
'publisher',
-
'description',
-
'version',
-
'url',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
stringency: [ 'comparable', 'fully-specified', 'equivalent', 'convertable', 'scaleable', 'flexible' ],
-
status: [ 'draft', 'active', 'retired' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec contact
-
1
class DataElementContactComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :name, type: String
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec mapping
-
1
class DataElementMappingComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :fhirIdentity, type: String
-
1
validates_presence_of :fhirIdentity
-
1
field :uri, type: String
-
1
field :name, type: String
-
1
field :comments, type: String
-
end
-
-
1
field :url, type: String
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :versionNum, type: String
-
1
field :name, type: String
-
1
field :status, type: String
-
1
validates :status, :inclusion => { in: VALID_CODES[:status] }
-
1
validates_presence_of :status
-
1
field :experimental, type: Boolean
-
1
field :publisher, type: String
-
1
embeds_many :contact, class_name:'FHIR::DataElement::DataElementContactComponent'
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_many :useContext, class_name:'FHIR::CodeableConcept'
-
1
field :copyright, type: String
-
1
field :stringency, type: String
-
1
embeds_many :mapping, class_name:'FHIR::DataElement::DataElementMappingComponent'
-
1
embeds_many :element, class_name:'FHIR::ElementDefinition'
-
1
validates_presence_of :element
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class DetectedIssue
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::DetectedIssue
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'identifier',
-
'patient',
-
'author',
-
'implicated',
-
'category'
-
]
-
-
1
VALID_CODES = {
-
severity: [ 'high', 'moderate', 'low' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec mitigation
-
1
class DetectedIssueMitigationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :action, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :action
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :author, class_name:'FHIR::Reference'
-
end
-
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
embeds_one :category, class_name:'FHIR::CodeableConcept'
-
1
field :severity, type: String
-
1
embeds_many :implicated, class_name:'FHIR::Reference'
-
1
field :detail, type: String
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :author, class_name:'FHIR::Reference'
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
field :reference, type: String
-
1
embeds_many :mitigation, class_name:'FHIR::DetectedIssue::DetectedIssueMitigationComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Device
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Device
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'patient',
-
'organization',
-
'model',
-
'location',
-
'udi',
-
'type',
-
'url',
-
'manufacturer'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'available', 'not-available', 'entered-in-error' ]
-
}
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :fhirType
-
1
embeds_many :note, class_name:'FHIR::Annotation'
-
1
field :status, type: String
-
1
field :manufacturer, type: String
-
1
field :model, type: String
-
1
field :versionNum, type: String
-
1
field :manufactureDate, type: String
-
1
validates :manufactureDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :expiry, type: String
-
1
validates :expiry, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :udi, type: String
-
1
field :lotNumber, type: String
-
1
embeds_one :owner, class_name:'FHIR::Reference'
-
1
embeds_one :location, class_name:'FHIR::Reference'
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
embeds_many :contact, class_name:'FHIR::ContactPoint'
-
1
field :url, type: String
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class DeviceComponent
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::DeviceComponent
-
-
1
SEARCH_PARAMS = [
-
'parent',
-
'source',
-
'type'
-
]
-
-
1
VALID_CODES = {
-
measurementPrinciple: [ 'other', 'chemical', 'electrical', 'impedance', 'nuclear', 'optical', 'thermal', 'biological', 'mechanical', 'acoustical', 'manual' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec productionSpecification
-
1
class DeviceComponentProductionSpecificationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :specType, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :componentId, class_name:'FHIR::Identifier'
-
1
field :productionSpec, type: String
-
end
-
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :fhirType
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
validates_presence_of :identifier
-
1
field :lastSystemChange, type: String
-
1
validates :lastSystemChange, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
1
validates_presence_of :lastSystemChange
-
1
embeds_one :source, class_name:'FHIR::Reference'
-
1
embeds_one :parent, class_name:'FHIR::Reference'
-
1
embeds_many :operationalStatus, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :parameterGroup, class_name:'FHIR::CodeableConcept'
-
1
field :measurementPrinciple, type: String
-
1
embeds_many :productionSpecification, class_name:'FHIR::DeviceComponent::DeviceComponentProductionSpecificationComponent'
-
1
embeds_one :languageCode, class_name:'FHIR::CodeableConcept'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class DeviceMetric
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::DeviceMetric
-
-
1
SEARCH_PARAMS = [
-
'parent',
-
'identifier',
-
'source',
-
'type',
-
'category'
-
]
-
-
1
VALID_CODES = {
-
operationalStatus: [ 'on', 'off', 'standby' ],
-
color: [ 'black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white' ],
-
category: [ 'measurement', 'setting', 'calculation', 'unspecified' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec calibration
-
1
class DeviceMetricCalibrationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
state: [ 'not-calibrated', 'calibration-required', 'calibrated', 'unspecified' ],
-
fhirType: [ 'unspecified', 'offset', 'gain', 'two-point' ]
-
}
-
-
1
field :fhirType, type: String
-
1
field :state, type: String
-
1
field :time, type: String
-
1
validates :time, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
end
-
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :fhirType
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
validates_presence_of :identifier
-
1
embeds_one :unit, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :source, class_name:'FHIR::Reference'
-
1
embeds_one :parent, class_name:'FHIR::Reference'
-
1
field :operationalStatus, type: String
-
1
field :color, type: String
-
1
field :category, type: String
-
1
validates_presence_of :category
-
1
embeds_one :measurementPeriod, class_name:'FHIR::Timing'
-
1
embeds_many :calibration, class_name:'FHIR::DeviceMetric::DeviceMetricCalibrationComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class DeviceUseRequest
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::DeviceUseRequest
-
-
1
SEARCH_PARAMS = [
-
'subject',
-
'patient',
-
'device'
-
]
-
-
1
VALID_CODES = {
-
priority: [ 'routine', 'urgent', 'stat', 'asap' ],
-
status: [ 'proposed', 'planned', 'requested', 'received', 'accepted', 'in-progress', 'completed', 'suspended', 'rejected', 'aborted' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
bodySite: [ 'bodySiteCodeableConcept', 'bodySiteReference' ],
-
timing: [ 'timingTiming', 'timingPeriod', 'timingDateTime' ]
-
}
-
-
1
embeds_one :bodySiteCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :bodySiteReference, class_name:'FHIR::Reference'
-
1
field :status, type: String
-
1
embeds_one :device, class_name:'FHIR::Reference'
-
1
validates_presence_of :device
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_many :indication, class_name:'FHIR::CodeableConcept'
-
1
field :notes, type: Array # Array of Strings
-
1
embeds_many :prnReason, class_name:'FHIR::CodeableConcept'
-
1
field :orderedOn, type: String
-
1
validates :orderedOn, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :recordedOn, type: String
-
1
validates :recordedOn, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
validates_presence_of :subject
-
1
embeds_one :timingTiming, class_name:'FHIR::Timing'
-
1
embeds_one :timingPeriod, class_name:'FHIR::Period'
-
1
field :timingDateTime, type: String
-
1
validates :timingDateTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :priority, type: String
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class DeviceUseStatement
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::DeviceUseStatement
-
-
1
SEARCH_PARAMS = [
-
'subject',
-
'patient',
-
'device'
-
]
-
1
MULTIPLE_TYPES = {
-
bodySite: [ 'bodySiteCodeableConcept', 'bodySiteReference' ],
-
timing: [ 'timingTiming', 'timingPeriod', 'timingDateTime' ]
-
}
-
-
1
embeds_one :bodySiteCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :bodySiteReference, class_name:'FHIR::Reference'
-
1
embeds_one :whenUsed, class_name:'FHIR::Period'
-
1
embeds_one :device, class_name:'FHIR::Reference'
-
1
validates_presence_of :device
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_many :indication, class_name:'FHIR::CodeableConcept'
-
1
field :notes, type: Array # Array of Strings
-
1
field :recordedOn, type: String
-
1
validates :recordedOn, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
validates_presence_of :subject
-
1
embeds_one :timingTiming, class_name:'FHIR::Timing'
-
1
embeds_one :timingPeriod, class_name:'FHIR::Period'
-
1
field :timingDateTime, type: String
-
1
validates :timingDateTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class DiagnosticOrder
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::DiagnosticOrder
-
-
1
SEARCH_PARAMS = [
-
'item-past-status',
-
'identifier',
-
'bodysite',
-
'code',
-
'event-date',
-
'event-status-date',
-
'subject',
-
'encounter',
-
'actor',
-
'item-date',
-
'item-status-date',
-
'event-status',
-
'item-status',
-
'patient',
-
'orderer',
-
'specimen',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
priority: [ 'routine', 'urgent', 'stat', 'asap' ],
-
status: [ 'proposed', 'draft', 'planned', 'requested', 'received', 'accepted', 'in-progress', 'review', 'completed', 'cancelled', 'suspended', 'rejected', 'failed' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec event
-
1
class DiagnosticOrderEventComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
description: [ '440622005', '394838008', '26895000' ],
-
status: [ 'proposed', 'draft', 'planned', 'requested', 'received', 'accepted', 'in-progress', 'review', 'completed', 'cancelled', 'suspended', 'rejected', 'failed' ]
-
}
-
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
embeds_one :description, class_name:'FHIR::CodeableConcept'
-
1
field :dateTime, type: String
-
1
validates :dateTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
validates_presence_of :dateTime
-
1
embeds_one :actor, class_name:'FHIR::Reference'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec item
-
1
class DiagnosticOrderItemComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
status: [ 'proposed', 'draft', 'planned', 'requested', 'received', 'accepted', 'in-progress', 'review', 'completed', 'cancelled', 'suspended', 'rejected', 'failed' ]
-
}
-
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :code
-
1
embeds_many :specimen, class_name:'FHIR::Reference'
-
1
embeds_one :bodySite, class_name:'FHIR::CodeableConcept'
-
1
field :status, type: String
-
1
embeds_many :event, class_name:'FHIR::DiagnosticOrder::DiagnosticOrderEventComponent'
-
end
-
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
validates_presence_of :subject
-
1
embeds_one :orderer, class_name:'FHIR::Reference'
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
embeds_many :reason, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :supportingInformation, class_name:'FHIR::Reference'
-
1
embeds_many :specimen, class_name:'FHIR::Reference'
-
1
field :status, type: String
-
1
field :priority, type: String
-
1
embeds_many :event, class_name:'FHIR::DiagnosticOrder::DiagnosticOrderEventComponent'
-
1
embeds_many :item, class_name:'FHIR::DiagnosticOrder::DiagnosticOrderItemComponent'
-
1
embeds_many :note, class_name:'FHIR::Annotation'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class DiagnosticReport
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::DiagnosticReport
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'identifier',
-
'image',
-
'request',
-
'performer',
-
'code',
-
'subject',
-
'diagnosis',
-
'encounter',
-
'result',
-
'patient',
-
'specimen',
-
'issued',
-
'category',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'registered', 'partial', 'final', 'corrected', 'appended', 'cancelled', 'entered-in-error' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
effective: [ 'effectiveDateTime', 'effectivePeriod' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec image
-
1
class DiagnosticReportImageComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :comment, type: String
-
1
embeds_one :link, class_name:'FHIR::Reference'
-
1
validates_presence_of :link
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
embeds_one :category, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :code
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
validates_presence_of :subject
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
field :effectiveDateTime, type: String
-
1
validates :effectiveDateTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
validates_presence_of :effectiveDateTime
-
1
embeds_one :effectivePeriod, class_name:'FHIR::Period'
-
1
validates_presence_of :effectivePeriod
-
1
field :issued, type: String
-
1
validates :issued, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
1
validates_presence_of :issued
-
1
embeds_one :performer, class_name:'FHIR::Reference'
-
1
validates_presence_of :performer
-
1
embeds_many :request, class_name:'FHIR::Reference'
-
1
embeds_many :specimen, class_name:'FHIR::Reference'
-
1
embeds_many :result, class_name:'FHIR::Reference'
-
1
embeds_many :imagingStudy, class_name:'FHIR::Reference'
-
1
embeds_many :image, class_name:'FHIR::DiagnosticReport::DiagnosticReportImageComponent'
-
1
field :conclusion, type: String
-
1
embeds_many :codedDiagnosis, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :presentedForm, class_name:'FHIR::Attachment'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class DocumentManifest
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::DocumentManifest
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'related-id',
-
'content-ref',
-
'subject',
-
'author',
-
'created',
-
'description',
-
'source',
-
'type',
-
'related-ref',
-
'patient',
-
'recipient',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'current', 'superseded', 'entered-in-error' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec content
-
1
class DocumentManifestContentComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
p: [ 'pAttachment', 'pReference' ]
-
}
-
-
1
embeds_one :pAttachment, class_name:'FHIR::Attachment'
-
1
validates_presence_of :pAttachment
-
1
embeds_one :pReference, class_name:'FHIR::Reference'
-
1
validates_presence_of :pReference
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec related
-
1
class DocumentManifestRelatedComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :ref, class_name:'FHIR::Reference'
-
end
-
-
1
embeds_one :masterIdentifier, class_name:'FHIR::Identifier'
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
embeds_many :recipient, class_name:'FHIR::Reference'
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :author, class_name:'FHIR::Reference'
-
1
field :created, type: String
-
1
validates :created, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :source, type: String
-
1
field :status, type: String
-
1
validates :status, :inclusion => { in: VALID_CODES[:status] }
-
1
validates_presence_of :status
-
1
field :description, type: String
-
1
embeds_many :content, class_name:'FHIR::DocumentManifest::DocumentManifestContentComponent'
-
1
validates_presence_of :content
-
1
embeds_many :related, class_name:'FHIR::DocumentManifest::DocumentManifestRelatedComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class DocumentReference
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::DocumentReference
-
-
1
SEARCH_PARAMS = [
-
'securitylabel',
-
'subject',
-
'description',
-
'language',
-
'type',
-
'relation',
-
'setting',
-
'patient',
-
'relationship',
-
'event',
-
'class',
-
'authenticator',
-
'identifier',
-
'period',
-
'related-id',
-
'custodian',
-
'indexed',
-
'author',
-
'created',
-
'format',
-
'encounter',
-
'related-ref',
-
'location',
-
'relatesto',
-
'facility',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
fhirClass: [ '11369-6', '11485-0', '11486-8', '11488-4', '11506-3', '11543-6', '15508-5', '18726-0', '18761-7', '18842-5', '26436-6', '26441-6', '26442-4', '27895-2', '27896-0', '27897-8', '27898-6', '28570-0', '28619-5', '28634-4', '29749-9', '29750-7', '29751-5', '29752-3', '34109-9', '34117-2', '34121-4', '34122-2', '34133-9', '34140-4', '34748-4', '34775-7', '47039-3', '47042-7', '47045-0', '47046-8', '47049-2', '57017-6', '57016-8', '56445-0', '53576-5', '56447-6', '18748-4', '11504-8', '57133-1' ],
-
fhirType: [ '55107-7', '74155-3', '51851-4', '67851-6', '34744-3', '34873-0', '68552-9', '67852-4', '68471-2', '68483-7', '64058-1', '64070-6', '64053-2', '64054-0', '34862-3', '64062-3', '64078-9', '64066-4', '64060-7', '64074-8', '51849-8', '34763-3', '47039-3', '34094-3', '57830-2', '48765-2', '74152-0', '61359-6', '57055-6', '56446-8', '51848-0', '68814-3', '64064-9', '51847-2', '69981-9', '74154-6', '71230-7', '72134-0', '55108-5', '73568-8', '74144-7', '55109-3', '34095-0', '34096-8', '63485-7', '55110-1', '34098-4', '34097-6', '47040-1', '47041-9', '59284-0', '11488-4', '34099-2', '34756-7', '34758-3', '34760-9', '34879-7', '34761-7', '34764-1', '34776-5', '34779-9', '34781-5', '72555-6', '34783-1', '34785-6', '34795-5', '34798-9', '34797-1', '34800-3', '34777-3', '34803-7', '34855-7', '34805-2', '34807-8', '34810-2', '34812-8', '34814-4', '34816-9', '34820-1', '34822-7', '34824-3', '34826-8', '34828-4', '34788-0', '34791-4', '34103-2', '34831-8', '73575-3', '34833-4', '34837-5', '34839-1', '34841-7', '34845-8', '34847-4', '34849-0', '34851-6', '34853-2', '51846-4', '34104-0', '68619-6', '68633-7', '68639-4', '68486-0', '68648-5', '68651-9', '68661-8', '64072-2', '68551-1', '68670-9', '64056-5', '68681-6', '68685-7', '68694-9', '68705-3', '68566-9', '68570-1', '68575-0', '68716-0', '68469-6', '68727-7', '68892-9', '68897-8', '68746-7', '68757-4', '68765-7', '68869-7', '68874-7', '68787-1', '68879-6', '68802-8', '68864-8', '68812-7', '68821-8', '68586-7', '68590-9', '68597-4', '68837-4', '34102-4', '64080-5', '68846-5', '64068-0', '64076-3', '68852-3', '34100-8', '51854-8', '51845-6', '34749-2', '34101-6', '47042-7', '34864-9', '34869-8', '34865-6', '34866-4', '34872-2', '55111-9', '74148-8', '64297-5', '74208-0', '51899-3', '74150-4', '74151-2', '47048-4', '70004-7', '68611-3', '68625-3', '68635-2', '68641-0', '68652-7', '68673-3', '68687-3', '68556-0', '68696-4', '68557-8', '68577-6', '68708-7', '68718-6', '68748-3', '68767-3', '68778-0', '68794-7', '68855-6', '68804-4', '68604-8', '68640-2', '68706-1', '68788-9', '68822-6', '74213-0', '60280-5', '8653-8', '18842-5', '68612-1', '68626-1', '68642-8', '68653-5', '68663-4', '68674-1', '68688-1', '68697-2', '34745-0', '68558-6', '68572-7', '68578-4', '68709-5', '68719-4', '68733-5', '68738-4', '68749-1', '68768-1', '68773-1', '68779-8', '68795-4', '68856-4', '68805-1', '68815-0', '68591-7', '68831-7', '59259-2', '68841-6', '59258-4', '34105-7', '68823-4', '34106-5', '55112-7', '34895-3', '34897-9', '67854-0', '68477-9', '68605-5', '67855-7', '34902-7', '34107-3', '34856-5', '34859-9', '34860-7', '70005-4', '64142-3', '34857-3', '72267-8', '47420-5', '47043-5', '34787-2', '34790-6', '34793-0', '34843-3', '34114-9', '64290-0', '64291-8', '57024-2', '64289-2', '51897-7', '56444-3', '74146-2', '34117-2', '68614-7', '68622-0', '68628-7', '68637-8', '68644-4', '68655-0', '68665-9', '68676-6', '68683-2', '68690-7', '68699-8', '68560-2', '68573-5', '68580-0', '68711-1', '68721-0', '68731-9', '68735-0', '68740-0', '68751-7', '68760-8', '68770-7', '68775-6', '68781-4', '68791-3', '68797-0', '68858-0', '68807-7', '68817-6', '28626-0', '68592-5', '68833-3', '68599-0', '68843-2', '34774-0', '68849-9', '11492-6', '34115-6', '68825-9', '67856-5', '34116-4', '74264-3', '74149-6', '28636-9', '28581-7', '68553-7', '18740-1', '47044-3', '64065-6', '68470-4', '34119-8', '34120-6', '34118-0', '74209-8', '74188-4', '74194-2', '74191-8', '74190-0', '74193-4', '74192-6', '74197-5', '74187-6', '74196-7', '74195-9', '74189-2', '34121-4', '34896-1', '34899-5', '55113-5', '57056-4', '57057-2', '64299-1', '51852-2', '68684-0', '68866-3', '68593-3', '68609-7', '68620-4', '68624-6', '68634-5', '68649-3', '68662-6', '68671-7', '68555-2', '68682-4', '68686-5', '68695-6', '68707-9', '68567-7', '68571-9', '68576-8', '68585-9', '68717-8', '68728-5', '68893-7', '68898-6', '68747-5', '68758-2', '68766-5', '68870-5', '68875-4', '68789-7', '68880-4', '68803-6', '68865-5', '68813-5', '68826-7', '68598-2', '68838-2', '68847-3', '68853-1', '57058-0', '64285-0', '60590-7', '60593-1', '70006-2', '68587-5', '61357-0', '61356-2', '56445-0', '74145-4', '74147-0', '59268-3', '34109-9', '68615-4', '68621-2', '68629-5', '34750-0', '68636-0', '34752-6', '68645-1', '68650-1', '68656-8', '34754-2', '28618-7', '34759-1', '68666-7', '34861-5', '34878-9', '34898-7', '34762-5', '34765-8', '34767-4', '34768-2', '34769-0', '34780-7', '34782-3', '34794-8', '34784-9', '34786-4', '68677-4', '34796-3', '34799-7', '34905-0', '68700-4', '34746-8', '34801-1', '34778-1', '34802-9', '28578-3', '34806-0', '34808-6', '34811-0', '34813-6', '34815-1', '34817-7', '34858-1', '34906-8', '51855-5', '68722-8', '68889-5', '68894-5', '68741-8', '68752-5', '68761-6', '68867-1', '68871-3', '68782-2', '68854-9', '68876-2', '68881-2', '68859-8', '68882-0', '68818-4', '34821-9', '34823-5', '28579-1', '34827-6', '34829-2', '68834-1', '28628-6', '34792-2', '34830-0', '34832-6', '34834-2', '68839-0', '34838-3', '34840-9', '28653-4', '28571-8', '34846-6', '34848-2', '34773-2', '68848-1', '34852-4', '34111-5', '57053-1', '34112-3', '64069-8', '68827-5', '64077-1', '64073-0', '34113-1', '34108-1', '34753-4', '34110-7', '34766-6', '68601-4', '34850-8', '34854-0', '68672-5', '34748-4', '34139-6', '34844-1', '74166-0', '74156-1', '64300-7', '60591-5', '60592-3', '57834-4', '48768-6', '53576-5', '64296-7', '72170-4', '56447-6', '64295-9', '51900-9', '67860-7', '67861-5', '34875-5', '34880-5', '68610-5', '68606-3', '34867-2', '64298-3', '74207-2', '67862-3', '68616-2', '68623-8', '34751-8', '68638-6', '68657-6', '68550-3', '68678-2', '68691-5', '68701-2', '34747-6', '68562-8', '34809-4', '68581-8', '68713-7', '68723-6', '68732-7', '68736-8', '68742-6', '68753-3', '68762-4', '68771-5', '68776-4', '68783-0', '68792-1', '68798-8', '68860-6', '68808-5', '68819-2', '68594-1', '68835-8', '68844-0', '34876-3', '34881-3', '68850-7', '34123-0', '68828-3', '57832-8', '64288-4', '57829-4', '57833-6', '57831-0', '57828-6', '73709-8', '55114-3', '57017-6', '57016-8', '64293-4', '68630-3', '68658-4', '68667-5', '68692-3', '68702-0', '68563-6', '68714-5', '68724-4', '68890-3', '68895-2', '68743-4', '68754-1', '68868-9', '68872-1', '68784-8', '68877-0', '68799-6', '68861-4', '68809-3', '68820-0', '68836-6', '68851-5', '68729-3', '68829-1', '68607-1', '11506-3', '68617-0', '68631-1', '68646-9', '28580-9', '68659-2', '28617-9', '68668-3', '34900-1', '68554-5', '72556-4', '34904-3', '68679-0', '68693-1', '68703-8', '28623-7', '28575-9', '68564-4', '11507-1', '68574-3', '68582-6', '68725-1', '68891-1', '68896-0', '68744-2', '68755-8', '68763-2', '68873-9', '68785-5', '68878-8', '68800-2', '68862-2', '68810-1', '11508-9', '18733-6', '28569-2', '68595-8', '11509-7', '28627-8', '11510-5', '68840-8', '28656-7', '11512-1', '15507-7', '34130-5', '68472-0', '68485-2', '68484-5', '64059-9', '64071-4', '68473-8', '64055-7', '68475-3', '68830-9', '64063-1', '64079-7', '68478-7', '68479-5', '64057-3', '64067-2', '68480-3', '64061-5', '64075-5', '68481-1', '70238-1', '34126-3', '34131-3', '34124-8', '34128-9', '34127-1', '34901-9', '34132-1', '34129-7', '34125-5', '74468-0', '74465-6', '73569-6', '64294-2', '64284-3', '57133-1', '57170-3', '57178-6', '57134-9', '57135-6', '57136-4', '57137-2', '69438-0', '57138-0', '57139-8', '57171-1', '57172-9', '57141-4', '57142-2', '57143-0', '57144-8', '57146-3', '57145-5', '57173-7', '57179-4', '57147-1', '57148-9', '57149-7', '57150-5', '57151-3', '57174-5', '57175-2', '57176-0', '57152-1', '57153-9', '57154-7', '57155-4', '57156-2', '57157-0', '57158-8', '57177-8', '57159-6', '57160-4', '57162-0', '57163-8', '57164-6', '57165-3', '57166-1', '57167-9', '57168-7', '57169-5', '64292-6', '55115-0', '70007-0', '68476-1', '68474-6', '71482-4', '51898-5', '74153-8', '59282-4', '47045-0', '68608-9', '61143-4', '68602-2', '68603-0', '47046-8', '34133-9', '74211-4', '48764-5', '47047-6', '67865-6', '34135-4', '34136-2', '34134-7', '61358-8', '11504-8', '34868-0', '34818-5', '34870-6', '28624-5', '34874-8', '34877-1', '34137-0', '34138-8', '18761-7', '68618-8', '68632-9', '68647-7', '68660-0', '34755-9', '68669-1', '34770-8', '68680-8', '68704-6', '68565-1', '68569-3', '68887-9', '68583-4', '68715-2', '68726-9', '68737-6', '68745-9', '68756-6', '68764-0', '68772-3', '68777-2', '68786-3', '68793-9', '68801-0', '68863-0', '68811-9', '68883-8', '68596-6', '68482-9', '68884-6', '59281-6', '74198-3', '54094-8', '57054-9', '38932-0', '38933-8', '38934-6', '38936-1', '38937-9', '38938-7', '38939-5', '38940-3', '38941-1', '38942-9', '38943-7', '38944-5', '38956-9', '38946-0', '38949-4', '38950-2', '38966-8', '38951-0', '38952-8', '38953-6', '38954-4', '38969-2', '38955-1', '38957-7', '38958-5', '38959-3', '38960-1', '38961-9', '38962-7', '38963-5', '38964-3', '38965-0', '38967-6', '38968-4', '38947-8', '38935-3', '38945-2', '38948-6', '38972-6', '38980-9', '38970-0', '38971-8', '38973-4', '38979-1', '38974-2', '38975-9', '38976-7', '38977-5', '38978-3', '38981-7', '38982-5', '38983-3', '38984-1', '38985-8', '38986-6', '38987-4', '38988-2', '59283-2', '52027-0', '24754-4', '26376-4', '26377-2', '26378-0', '53243-2', '11485-0', '30649-8', '30641-5', '36760-7', '36762-3', '69067-7', '24543-1', '24580-3', '26368-1', '26369-9', '24614-0', '24615-7', '35881-2', '24698-3', '36763-1', '24766-8', '26370-7', '26371-5', '26372-3', '24832-8', '30648-0', '25081-1', '25012-6', '26373-1', '26374-9', '26375-6', '43793-9', '43794-7', '43795-4', '43792-1', '25064-7', '30836-1', '37426-4', '30640-7', '35882-0', '52032-0', '36764-9', '69135-2', '69253-3', '36765-6', '35883-8', '36766-4', '24568-8', '28615-3', '52065-0', '18743-5', '36761-5', '33720-4', '52041-1', '38268-9', '43562-8', '43563-6', '48807-2', '24631-4', '53242-4', '54095-5', '11486-8', '71428-7', '71421-2', '71388-3', '71406-3', '25062-1', '24611-6', '60570-9', '60571-7', '52042-9', '25038-1', '29751-5', '50007-4', '47523-6', '47530-1', '47521-0', '50971-1', '47528-5', '47527-7', '47522-8', '47520-2', '47524-4', '47529-3', '33718-8', '47525-1', '47526-9', '52040-3', '29749-9', '28622-9', '28574-2', '29761-4', '11490-0', '28655-9', '53245-7', '53247-3', '24684-3', '24887-2', '24553-0', '24554-8', '52071-8', '67796-3', '52043-7', '30600-1', '24923-5', '52030-4', '52031-2', '52044-5', '29272-2', '52064-3', '57129-9', '52045-2', '52033-8', '51969-4', '46365-3', '44228-5', '44156-8', '44101-4', '44155-0', '58747-7', '58743-6', '35884-6', '42280-8', '42705-4', '42281-6', '42285-7', '44167-5', '42282-4', '42133-9', '39361-1', '69120-4', '69122-0', '42286-5', '44168-3', '44169-1', '42284-0', '69123-8', '43502-4', '44166-7', '30578-9', '39451-0', '35885-3', '39620-0', '39623-4', '39622-6', '39621-8', '72533-3', '72532-5', '24623-1', '42688-2', '35886-1', '24598-5', '43756-6', '69278-0', '69292-1', '69296-2', '35888-7', '24771-8', '48434-5', '24811-2', '24822-9', '69287-1', '24837-7', '39452-8', '24856-7', '24863-3', '30703-3', '37491-8', '24662-9', '37887-7', '24973-0', '42134-7', '25043-1', '30878-3', '36926-4', '37210-2', '69306-9', '24594-4', '69192-3', '30653-0', '26343-4', '38012-1', '26344-2', '42450-7', '26345-9', '42458-0', '38126-9', '69121-2', '38133-5', '42447-3', '35887-9', '30698-5', '24671-0', '25042-3', '25041-5', '46281-2', '46282-0', '30602-7', '44107-1', '44108-9', '46387-7', '44160-0', '46284-6', '38026-1', '46283-8', '38033-7', '38135-0', '44221-0', '43757-4', '44159-2', '44217-8', '30608-4', '30603-5', '44158-4', '44220-2', '30595-3', '44103-0', '44219-4', '44104-8', '44105-5', '30605-0', '44157-6', '44218-6', '30606-8', '44106-3', '38017-0', '30610-0', '38136-8', '69124-6', '38019-6', '44216-0', '30580-5', '38018-8', '44215-2', '24755-1', '26298-0', '26299-8', '26300-4', '30601-9', '37913-1', '35890-3', '44117-0', '44162-6', '36767-2', '35891-1', '69076-8', '37211-0', '35893-7', '24602-5', '37914-9', '26337-6', '69169-1', '37912-3', '26338-4', '69203-8', '42449-9', '26339-2', '69213-7', '42457-2', '35895-2', '37915-6', '35894-5', '37492-6', '42333-5', '43567-7', '43565-1', '44109-7', '42463-0', '37212-8', '69387-9', '36927-2', '35892-9', '42136-2', '42279-0', '24772-6', '35899-4', '38766-2', '30607-6', '26340-0', '26341-8', '26342-6', '24812-0', '24816-1', '35900-0', '38765-4', '35896-0', '24823-7', '44161-8', '30634-0', '35901-8', '39522-8', '37213-6', '42137-0', '36768-0', '37917-2', '24838-5', '37918-0', '30604-3', '37919-8', '35902-6', '24864-1', '69074-3', '35903-4', '24883-1', '41802-0', '35898-6', '37920-6', '69075-0', '38132-7', '69396-0', '24986-2', '35904-2', '35905-9', '35906-7', '30609-2', '35907-5', '42265-9', '42135-4', '38154-1', '43797-0', '43564-4', '37214-4', '35908-3', '25009-2', '35897-8', '25044-9', '25059-7', '25069-6', '24670-2', '30651-4', '24813-8', '69279-8', '46285-3', '38024-6', '69073-5', '42448-1', '30652-2', '42288-1', '69224-4', '46367-9', '46368-7', '46286-1', '38028-7', '41803-8', '43462-1', '43447-2', '69290-5', '38029-5', '69225-1', '69099-0', '44171-7', '69127-9', '43568-5', '42289-9', '38027-9', '69097-4', '69197-2', '44170-9', '69125-3', '42267-5', '37916-4', '69098-2', '69198-0', '69288-9', '69226-9', '46369-5', '42290-7', '69199-8', '69289-7', '69126-1', '46370-3', '69200-4', '69227-7', '46288-7', '69228-5', '69100-6', '69201-2', '69291-3', '69128-7', '43571-9', '69401-8', '38030-3', '42266-7', '69101-4', '69202-0', '38031-1', '69129-5', '46287-9', '30700-9', '44225-1', '24718-9', '35910-9', '46289-5', '35909-1', '69093-3', '42260-0', '46366-1', '46384-4', '69083-4', '35911-7', '69092-5', '69094-1', '46290-3', '35889-5', '64998-8', '64999-6', '30818-9', '30892-4', '24624-9', '26331-9', '26332-7', '26333-5', '43558-6', '36769-8', '24781-7', '46371-1', '30646-4', '69400-0', '69391-1', '38127-7', '70915-4', '70916-2', '70917-0', '24680-1', '35913-3', '42287-3', '41809-5', '35914-1', '35915-8', '36770-6', '35916-6', '69078-4', '24692-6', '26325-1', '26326-9', '26327-7', '35917-4', '69133-7', '35918-2', '24896-3', '26328-5', '26329-3', '26330-1', '35919-0', '35920-8', '42283-2', '44172-5', '35921-6', '24868-2', '41800-4', '41798-0', '35922-4', '30699-3', '43537-0', '42478-8', '46291-1', '35923-2', '46292-9', '35924-0', '46293-7', '35925-7', '43478-7', '43474-6', '43477-9', '43473-8', '43475-3', '43476-1', '72248-8', '44214-5', '30815-5', '44213-7', '58740-2', '72541-6', '72542-4', '72540-8', '35926-5', '30638-1', '24769-2', '42334-3', '42706-2', '24901-1', '35927-3', '26319-4', '26320-2', '26321-0', '48435-2', '46392-7', '37427-2', '30579-7', '24931-8', '26322-8', '26323-6', '26324-4', '70918-8', '30812-2', '37493-4', '70919-6', '30817-1', '70920-4', '30814-8', '30702-5', '72530-9', '36771-4', '37494-2', '72537-4', '72645-5', '72644-8', '72536-6', '72643-0', '72642-2', '72543-2', '72552-3', '72553-1', '72535-8', '72534-1', '48735-5', '43759-0', '35928-1', '42296-4', '43758-2', '35929-9', '42297-2', '43760-8', '37608-7', '42701-3', '39760-4', '39759-6', '39761-2', '39953-5', '39763-8', '39762-0', '39758-8', '44110-5', '24600-9', '69068-5', '26313-7', '26314-5', '26318-6', '37921-4', '42021-6', '42020-8', '39026-0', '39028-6', '38032-9', '39027-8', '24595-1', '26315-2', '26316-0', '26317-8', '44118-8', '35930-7', '35931-5', '70921-2', '35932-3', '70922-0', '69240-0', '42139-6', '24609-0', '26334-3', '26335-0', '38023-8', '26336-8', '38025-3', '44121-2', '69245-9', '69246-7', '44204-6', '69247-5', '46372-9', '62494-0', '24621-5', '69241-8', '69242-6', '42422-6', '43444-9', '42423-4', '69243-4', '44223-6', '69244-2', '42421-8', '35933-1', '35936-4', '70923-8', '35934-9', '70924-6', '35935-6', '70925-3', '72539-0', '30643-1', '35912-5', '25028-2', '25029-0', '24613-2', '30644-9', '25077-9', '24625-6', '26310-3', '26311-1', '26312-9', '41801-2', '24716-3', '62491-6', '62492-4', '25072-0', '62450-2', '25026-6', '25027-4', '26307-9', '26308-7', '26309-5', '25024-1', '26304-6', '26305-3', '26306-1', '64993-9', '42456-4', '36772-2', '24779-1', '24782-5', '35937-2', '43487-8', '65797-3', '65798-1', '69134-5', '25078-7', '24756-9', '26301-2', '26302-0', '26303-8', '24555-5', '51391-1', '35938-0', '42140-4', '39362-9', '30637-3', '41799-8', '24995-3', '44224-4', '46373-7', '44102-2', '44222-8', '30629-0', '30581-3', '30664-7', '30582-1', '30665-4', '25053-0', '25054-8', '24537-3', '42141-2', '72549-9', '72548-1', '72547-3', '72546-5', '41810-3', '24559-7', '38142-6', '30628-2', '72538-2', '72544-0', '24885-6', '72550-7', '72551-5', '42017-4', '52790-3', '72545-7', '52791-1', '46294-5', '24996-1', '24626-4', '26295-6', '26296-4', '26297-2', '48740-5', '48736-3', '48739-7', '24570-4', '43763-2', '43761-6', '43762-4', '43764-0', '72554-9', '39138-3', '39139-1', '36936-3', '24603-3', '26292-3', '26293-1', '26294-9', '36928-0', '46296-0', '46295-2', '42433-3', '69160-0', '24585-2', '36929-8', '44122-0', '30656-3', '30800-7', '28632-8', '46264-8', '47519-4', '47245-6', '52035-3', '52036-1', '52046-0', '18841-7', '52028-8', '24655-3', '52047-8', '65806-2', '11500-6', '11495-9', '11494-2', '11496-7', '11497-5', '11498-3', '28572-6', '28621-1', '29753-1', '18734-4', '18735-1', '18736-9', '28654-2', '18763-3', '18737-7', '28635-1', '18738-5', '18739-3', '46214-3', '15508-5', '11502-2', '24717-1', '52048-6', '52049-4', '55186-1', '55185-3', '11503-0', '52037-9', '24672-8', '30632-4', '52050-2', '35990-1', '41806-1', '24556-3', '24558-9', '30762-9', '24566-2', '24531-6', '24532-4', '44115-4', '36781-3', '30864-3', '36791-2', '24534-0', '39494-0', '36930-6', '36931-4', '69277-2', '36792-0', '35940-6', '24538-1', '35939-8', '35941-4', '26208-9', '35942-2', '26209-7', '35943-0', '35944-8', '26210-5', '37674-9', '37222-7', '24542-3', '35945-5', '35947-1', '35946-3', '24547-2', '46388-5', '35948-9', '35949-7', '69276-4', '37216-9', '24544-9', '35950-5', '24660-3', '30863-5', '35951-3', '30861-9', '35952-1', '24548-0', '39040-1', '43508-1', '72529-1', '43510-7', '72528-3', '37219-3', '38021-2', '37220-1', '39039-3', '24590-2', '58748-5', '44138-6', '37217-7', '37218-5', '43772-3', '42385-5', '30794-2', '24601-7', '69165-9', '38057-6', '38058-4', '24596-9', '69397-8', '30795-9', '26214-7', '35954-7', '26215-4', '35955-4', '26216-2', '46299-4', '36010-7', '36011-5', '24616-5', '42146-1', '26217-0', '43765-7', '26218-8', '39427-0', '26219-6', '39437-9', '43552-9', '36793-8', '30859-3', '30865-0', '46374-5', '24627-2', '24629-8', '24630-6', '24657-9', '30862-7', '38016-2', '37235-9', '35960-4', '35961-2', '35959-6', '44120-4', '24757-7', '35962-0', '24674-4', '35963-8', '35965-3', '26220-4', '35964-6', '35966-1', '26221-2', '35967-9', '35968-7', '26222-0', '37688-9', '35969-5', '57823-7', '24690-0', '69193-1', '24693-4', '35970-3', '39042-7', '39031-0', '69293-9', '39428-8', '69297-0', '39439-5', '39449-4', '39418-9', '42145-3', '39429-6', '42144-6', '39440-3', '30876-7', '69283-0', '41835-0', '41816-0', '36794-6', '43771-5', '39495-7', '69398-6', '39503-8', '26224-6', '26223-8', '26226-1', '26225-3', '26231-1', '26230-3', '24853-4', '35953-9', '41808-7', '24696-7', '69389-5', '69399-4', '30871-8', '38134-3', '38128-5', '39498-1', '39504-6', '35984-4', '35985-1', '35986-9', '35987-7', '38037-8', '35988-5', '35989-3', '38048-5', '38768-8', '24705-6', '26238-6', '26239-4', '26240-2', '37221-9', '35991-9', '24707-2', '35992-7', '30872-6', '46362-0', '35993-5', '26241-0', '35994-3', '26242-8', '35995-0', '35996-8', '26243-6', '37706-9', '35997-6', '24710-6', '30873-4', '35998-4', '26244-4', '35999-2', '26245-1', '36000-8', '26246-9', '24711-4', '36001-6', '39415-5', '39416-3', '37236-7', '24719-7', '36002-4', '24720-5', '36003-2', '46382-8', '36004-0', '26247-7', '36005-7', '26248-5', '36006-5', '36007-3', '26249-3', '37717-6', '24725-4', '24728-8', '24731-2', '58741-0', '30858-5', '30856-9', '24733-8', '42304-6', '30880-9', '30655-5', '24746-0', '58742-8', '44164-2', '58744-4', '24748-6', '36009-9', '44137-8', '42148-7', '36014-9', '36013-1', '24760-1', '36012-3', '36016-4', '36017-2', '26250-1', '36015-6', '36018-0', '36020-6', '26251-9', '36019-8', '36021-4', '36022-2', '26252-7', '37735-8', '43566-9', '36024-8', '39425-4', '42147-9', '39497-3', '38129-3', '38137-6', '38141-8', '35958-8', '35956-2', '24767-6', '26253-5', '35957-0', '26254-3', '38767-0', '26255-0', '24735-3', '36033-9', '38036-0', '36032-1', '39032-8', '42477-0', '43767-3', '36034-7', '43774-9', '24789-0', '69402-6', '36035-4', '38038-6', '69113-9', '36036-2', '38049-3', '36037-0', '24802-1', '36038-8', '36799-5', '36800-1', '36801-9', '36040-4', '26256-8', '36039-6', '36041-2', '26257-6', '36042-0', '36043-8', '26258-4', '37760-6', '36045-3', '36044-6', '24814-6', '36046-1', '28614-6', '39454-4', '24818-7', '35971-1', '30692-8', '30709-0', '35972-9', '48693-6', '39434-6', '38130-1', '39421-3', '41834-3', '39499-9', '41815-2', '39505-3', '46363-8', '30881-7', '46364-6', '39420-5', '48692-8', '39432-0', '48691-0', '39443-7', '36079-2', '69385-3', '36784-7', '69392-9', '36785-4', '42461-4', '42462-2', '30874-2', '44174-1', '35974-5', '39422-1', '36795-3', '39431-2', '36796-1', '39442-9', '35973-7', '35975-2', '38013-9', '24687-6', '26227-9', '26228-7', '26229-5', '35976-0', '35978-6', '38040-2', '35977-8', '35979-4', '35980-2', '38051-9', '37766-3', '36074-3', '24821-1', '43513-1', '43556-0', '42696-5', '36075-0', '36076-8', '30866-8', '57822-9', '36047-9', '36048-7', '38043-6', '36776-3', '46298-6', '36050-3', '36049-5', '37234-2', '38044-4', '37233-4', '69394-5', '69211-1', '37606-1', '30860-1', '24835-1', '36051-1', '24839-3', '24842-7', '36788-8', '36085-9', '44175-8', '30857-7', '41807-9', '36777-1', '36802-7', '24848-4', '37611-1', '38836-3', '36778-9', '42303-8', '43530-5', '43455-5', '39502-0', '36779-7', '69390-3', '43506-5', '24857-5', '36052-9', '24859-1', '39509-5', '36053-7', '38045-1', '37223-5', '37224-3', '38138-4', '24865-8', '24867-4', '24869-0', '37632-7', '36789-6', '30867-6', '24870-8', '24872-4', '26259-2', '26260-0', '26261-8', '38140-0', '38139-2', '24877-3', '36932-2', '24880-7', '24881-5', '26262-6', '26263-4', '26264-2', '36077-6', '69284-8', '36055-2', '36056-0', '36057-8', '30675-3', '24884-9', '43445-6', '43454-8', '36803-5', '24892-2', '69294-7', '39435-3', '36078-4', '30868-4', '69295-4', '39426-2', '36804-3', '39419-7', '30619-1', '36031-3', '36058-6', '36059-4', '38053-5', '37653-3', '69116-2', '36060-2', '36933-0', '69298-8', '69117-0', '36061-0', '36073-5', '25002-7', '48742-1', '26271-7', '26272-5', '26273-3', '42437-4', '36062-8', '24905-2', '24907-8', '37850-5', '36805-0', '36806-8', '36807-6', '36063-6', '26266-7', '26265-9', '36064-4', '26268-3', '26267-5', '36065-1', '36066-9', '26270-9', '26269-1', '37811-7', '30588-8', '24914-4', '37866-1', '37874-5', '37495-9', '28566-8', '36067-7', '24926-8', '37497-5', '24932-6', '24935-9', '70926-1', '36068-5', '43457-1', '42698-1', '24963-1', '24968-0', '69393-7', '36069-3', '37232-6', '24978-9', '24980-5', '70927-9', '37911-5', '49565-5', '24988-8', '36070-1', '24990-4', '37225-0', '36071-9', '36072-7', '37885-1', '36782-1', '38131-9', '46359-6', '44235-0', '42468-9', '38059-2', '36773-0', '37226-8', '24999-5', '30719-9', '37228-4', '37227-6', '37230-0', '37229-2', '37231-8', '37819-0', '39446-0', '24702-3', '26235-2', '26236-0', '26237-8', '36054-5', '24582-9', '44163-4', '26211-3', '26212-1', '26213-9', '43507-3', '42300-4', '25010-0', '37898-4', '30888-2', '36780-5', '69285-5', '39508-7', '36023-0', '36025-5', '36026-3', '69180-8', '36027-1', '36028-9', '36029-7', '36030-5', '35981-0', '24688-4', '30710-8', '37923-0', '48448-5', '39447-8', '38014-7', '39423-9', '41833-5', '39500-4', '41814-5', '39506-1', '30882-5', '48690-2', '39496-5', '48689-4', '39501-2', '48688-6', '39507-9', '36080-0', '69395-2', '36786-2', '36787-0', '46385-1', '44236-8', '42475-4', '42476-2', '36084-2', '39448-6', '46379-4', '36797-9', '39433-8', '36798-7', '39444-5', '26232-9', '30875-9', '36774-8', '36775-5', '35982-8', '26233-7', '38041-0', '35983-6', '26234-5', '38052-7', '25019-1', '42301-2', '30705-8', '39036-9', '39525-1', '39030-2', '36783-9', '69222-8', '36081-8', '36083-4', '36082-6', '36790-4', '39445-2', '38054-3', '37428-0', '25033-2', '25036-5', '37932-1', '37430-6', '26277-4', '26278-2', '37429-8', '37431-4', '26279-0', '26280-8', '37432-2', '69209-5', '37433-0', '26281-6', '26282-4', '37644-2', '69219-4', '36008-1', '25045-6', '25040-7', '25056-3', '44136-0', '25061-3', '25071-2', '46375-2', '39523-6', '44229-3', '28576-7', '39453-6', '36957-9', '37294-6', '41804-6', '39043-5', '44165-9', '58745-1', '59255-0', '69082-6', '37295-3', '72830-3', '72832-9', '39879-2', '39881-8', '30760-3', '25055-5', '39408-0', '39862-8', '47378-5', '37435-5', '42693-2', '39140-9', '44126-1', '42386-3', '42387-1', '37434-8', '46300-0', '72139-9', '72138-1', '72137-3', '37436-3', '43555-2', '43449-8', '37437-1', '36114-7', '43450-6', '43451-4', '46394-3', '43452-2', '43453-0', '37438-9', '43527-1', '39637-4', '43655-0', '43652-7', '69235-0', '43670-9', '43673-3', '43662-6', '39684-6', '39811-5', '39141-7', '39656-4', '39654-9', '39655-6', '39675-4', '11525-3', '72251-2', '24889-8', '36934-8', '36935-5', '43446-4', '69237-6', '39678-8', '39748-9', '42292-3', '46395-0', '39913-9', '39918-8', '46396-8', '39916-2', '39930-3', '37439-7', '37440-5', '37441-3', '39409-8', '36086-7', '30704-1', '38047-7', '43572-7', '38011-3', '69280-6', '24599-3', '26286-5', '26288-1', '26290-7', '38015-4', '42149-5', '42151-1', '36089-1', '69281-4', '36090-9', '39526-9', '46301-8', '39424-7', '62451-0', '62452-8', '69286-3', '36937-1', '38020-4', '36087-5', '38034-5', '36808-4', '39044-3', '36091-7', '42707-0', '36092-5', '43776-4', '42150-3', '36088-3', '38035-2', '69300-2', '41812-9', '38042-8', '39430-4', '39441-1', '36093-3', '38039-4', '38050-1', '44116-2', '48461-8', '69212-9', '38046-9', '42152-9', '44173-3', '39436-1', '69299-6', '24913-6', '41813-7', '38143-4', '46302-6', '44237-6', '46303-4', '36094-1', '39045-0', '39524-4', '25039-9', '48460-0', '69282-2', '72831-1', '44127-9', '39046-8', '36102-2', '36095-8', '36096-6', '69096-6', '36098-2', '36099-0', '36100-6', '36101-4', '36097-4', '39681-2', '39813-1', '39821-4', '36103-0', '36105-5', '47366-0', '36938-9', '36104-8', '36106-3', '36107-1', '38769-6', '36108-9', '46304-2', '36109-7', '36110-5', '36111-3', '36112-1', '39905-5', '39906-3', '39527-7', '49569-7', '43659-2', '39725-7', '39718-2', '39724-0', '39723-2', '49568-9', '39729-9', '39700-0', '49567-1', '39142-5', '39712-5', '39734-9', '39736-4', '39710-9', '39711-7', '38060-0', '25052-2', '25050-6', '42132-1', '72142-3', '72141-5', '72140-7', '37442-1', '37443-9', '36939-7', '70929-5', '70928-7', '70930-3', '36940-5', '42455-6', '24677-7', '42390-5', '39838-8', '39898-2', '39872-7', '46305-9', '46358-8', '44139-4', '46306-7', '39680-4', '39816-4', '39825-5', '41837-6', '39658-0', '39662-2', '49566-3', '30711-6', '24732-0', '30706-6', '30701-7', '69388-7', '69086-7', '69108-9', '69085-9', '69207-9', '69217-8', '69208-7', '69218-6', '48442-8', '48450-1', '44114-7', '48452-7', '44113-9', '48441-0', '36267-3', '24557-1', '48743-9', '42274-1', '36846-4', '30805-6', '36855-5', '36950-4', '36951-2', '36268-1', '24539-9', '26187-5', '36269-9', '26188-3', '36270-7', '26189-1', '44131-1', '36271-5', '36273-1', '36272-3', '36274-9', '30806-4', '46360-4', '43509-9', '43511-5', '36944-7', '24587-8', '48694-4', '43769-9', '42392-1', '36276-4', '69189-9', '69166-7', '38870-2', '38062-6', '36277-2', '36278-0', '36279-8', '43528-9', '36358-0', '36280-6', '36281-4', '36856-3', '30598-7', '36283-0', '36848-0', '30804-9', '36420-8', '42277-4', '36284-8', '72252-0', '69161-8', '42299-8', '48455-0', '48454-3', '36285-5', '24675-1', '26193-3', '36286-3', '26194-1', '36287-1', '26195-8', '42268-3', '24694-2', '30803-1', '36338-2', '36339-0', '36340-8', '69194-9', '69204-6', '69214-5', '36341-6', '30682-9', '36342-4', '36343-2', '36344-0', '36345-7', '36346-5', '36347-3', '30684-5', '69174-1', '36348-1', '36349-9', '36350-7', '36351-5', '36352-3', '30686-0', '69177-4', '36353-1', '36354-9', '36355-6', '36356-4', '24726-2', '24729-6', '36847-2', '30593-8', '36857-1', '36357-2', '36359-8', '30688-6', '36360-6', '36361-4', '36362-2', '36363-0', '36364-8', '36365-5', '36282-2', '30659-7', '24740-3', '43768-1', '43775-6', '36377-0', '36378-8', '24784-1', '36379-6', '24803-9', '38837-1', '36862-1', '26199-0', '36380-4', '26200-6', '36381-2', '26201-4', '36382-0', '30612-6', '30670-4', '36288-9', '39291-0', '36416-6', '36849-8', '36850-6', '30807-2', '44128-7', '46308-3', '36858-9', '46307-5', '36859-7', '36289-7', '36371-3', '36372-1', '36373-9', '36290-5', '36291-3', '36292-1', '36333-3', '36408-3', '30870-0', '42697-3', '36409-1', '36410-9', '36411-7', '36412-5', '36383-8', '37272-2', '48443-6', '36384-6', '30586-2', '24840-1', '36853-0', '30594-6', '36423-2', '48451-9', '36842-3', '43458-9', '24849-2', '24851-8', '36843-1', '36844-9', '39029-4', '46310-9', '36845-6', '30614-2', '36385-3', '46311-7', '37265-6', '30616-7', '30674-6', '36854-8', '30623-3', '36863-9', '30672-0', '36835-7', '24904-5', '24879-9', '36414-1', '36387-9', '36388-7', '36389-5', '36275-6', '36415-8', '44134-5', '36375-4', '36376-2', '36390-3', '36391-1', '36392-9', '36393-7', '36394-5', '36406-7', '36395-2', '24906-0', '36864-7', '36865-4', '26202-2', '36396-0', '26203-0', '36397-8', '26204-8', '36398-6', '30663-9', '44111-3', '69220-2', '37277-1', '36399-4', '36400-0', '37505-5', '36401-8', '24937-5', '37506-3', '43456-3', '30855-1', '36402-6', '24967-2', '37507-1', '36403-4', '24981-3', '37508-9', '24989-6', '36404-2', '37266-4', '36405-9', '44231-9', '36837-3', '37267-2', '37268-0', '37269-8', '37270-6', '37271-4', '24703-1', '26196-6', '26197-4', '26198-2', '24583-7', '26190-9', '26191-7', '26192-5', '36407-5', '72241-3', '72238-9', '36366-3', '30690-2', '69181-6', '36367-1', '36368-9', '36369-7', '36370-5', '36334-1', '39034-4', '36417-4', '36851-4', '36852-2', '36421-6', '36422-4', '46312-5', '36860-5', '46309-1', '36861-3', '69186-5', '36374-7', '36840-7', '36841-5', '36335-8', '38831-4', '36336-6', '36337-4', '36413-3', '36418-2', '36419-0', '37457-9', '25035-7', '26205-5', '37458-7', '26206-3', '38802-5', '26207-1', '42298-0', '24588-6', '72244-7', '43448-0', '46318-2', '46317-4', '46315-8', '46316-6', '46314-1', '46313-3', '60515-4', '24586-0', '24936-7', '24977-1', '25046-4', '38022-0', '25047-2', '25057-1', '30599-5', '24567-0', '38055-0', '36809-2', '69162-6', '69238-4', '30853-6', '36941-3', '37237-5', '36115-4', '69102-2', '36116-2', '69109-7', '36117-0', '46319-0', '69103-0', '36118-8', '69110-5', '36119-6', '36120-4', '69105-5', '36121-2', '69112-1', '36122-0', '36124-6', '36125-3', '69106-3', '36126-1', '69114-7', '36127-9', '37238-3', '69210-3', '36123-8', '36128-7', '36129-5', '38828-0', '36130-3', '36131-1', '36132-9', '36810-0', '37444-7', '69107-1', '37445-4', '69115-4', '37446-2', '36811-8', '36812-6', '39322-3', '37496-7', '37509-7', '70931-1', '24734-6', '47985-7', '24934-2', '48447-7', '24965-6', '48436-0', '30596-1', '48439-4', '36134-5', '36813-4', '36828-2', '24533-2', '69908-2', '36943-9', '44124-6', '36135-2', '36136-0', '69163-4', '36137-8', '36138-6', '36139-4', '36140-2', '36142-8', '36141-0', '36143-6', '24545-6', '72255-3', '43503-2', '36144-4', '37499-1', '36145-1', '43504-0', '43505-7', '44125-3', '69095-8', '24589-4', '48444-4', '37239-1', '37215-1', '42391-3', '36149-3', '69190-7', '69167-5', '36150-1', '36151-9', '36152-7', '46323-2', '36198-0', '36153-5', '36154-3', '36146-9', '36829-0', '24628-0', '36156-8', '36266-5', '24659-5', '42275-8', '36942-1', '72254-6', '37254-0', '42694-0', '48457-6', '48456-8', '36157-6', '36158-4', '69170-9', '36159-2', '36160-0', '36161-8', '36162-6', '24691-8', '26184-2', '26185-9', '26186-7', '36148-5', '30801-5', '24697-5', '36172-5', '69172-5', '36174-1', '36176-6', '69195-6', '69205-3', '69215-2', '36178-2', '36179-0', '36180-8', '36181-6', '36182-4', '36183-2', '36184-0', '36185-7', '36186-5', '69175-8', '36187-3', '36188-1', '36189-9', '36190-7', '36191-5', '36192-3', '69178-2', '36193-1', '36194-9', '36195-6', '36196-4', '24727-0', '36814-2', '36826-6', '36830-8', '24593-6', '37498-3', '24747-8', '36197-2', '36200-4', '36199-8', '36201-2', '36202-0', '36203-8', '36204-6', '36205-3', '36206-1', '30583-9', '36155-0', '46322-4', '36113-9', '43766-5', '36219-4', '24790-8', '36220-2', '36221-0', '36222-8', '36223-6', '69088-3', '36224-4', '36225-1', '36226-9', '36227-7', '36228-5', '36229-3', '36230-1', '24815-3', '36231-9', '30624-1', '39293-6', '36824-1', '36825-8', '36831-6', '46324-0', '44135-2', '50755-8', '36163-4', '36213-7', '36214-5', '36215-2', '36164-2', '36165-9', '36166-7', '36167-5', '36258-2', '36259-0', '24820-3', '43512-3', '42695-7', '36260-8', '36261-6', '36262-4', '36263-2', '36232-7', '48446-9', '36233-5', '24836-9', '36235-0', '24841-9', '36827-4', '36234-3', '24844-3', '48449-3', '36820-9', '36832-4', '24850-0', '24852-6', '36821-7', '36822-5', '46320-8', '39038-5', '46321-6', '36823-3', '24858-3', '36236-8', '37240-9', '37241-7', '24866-6', '36237-6', '42294-9', '24873-2', '24878-1', '30590-4', '36238-4', '36242-6', '36243-4', '36244-2', '36147-7', '36833-2', '30887-4', '36217-8', '36218-6', '36245-9', '36246-7', '36247-5', '36248-3', '36249-1', '69221-0', '36250-9', '36251-7', '69184-0', '36252-5', '38830-6', '36253-3', '36254-1', '36255-8', '24915-1', '48440-2', '37253-2', '24987-0', '36256-6', '37500-6', '24933-4', '24938-3', '37501-4', '38061-8', '24964-9', '30678-7', '37502-2', '24979-7', '24982-1', '37503-0', '30622-5', '37242-5', '36257-4', '36815-9', '38835-5', '36816-7', '37243-3', '37244-1', '37245-8', '37246-6', '37247-4', '37248-2', '37249-0', '36173-3', '25003-5', '36175-8', '36177-4', '36239-2', '24584-5', '26181-8', '26182-6', '26183-4', '36240-0', '36241-8', '72243-9', '72240-5', '36207-9', '36208-7', '69182-4', '36209-5', '36210-3', '36211-1', '36212-9', '30626-6', '39037-7', '42295-6', '24549-8', '36168-3', '69187-3', '36216-0', '36817-5', '36818-3', '36819-1', '36169-1', '38829-8', '36170-9', '36171-7', '36264-0', '36265-7', '36834-0', '37447-0', '37448-8', '69091-7', '37449-6', '37450-4', '37451-2', '37452-0', '37453-8', '24753-6', '49507-7', '25058-9', '72531-7', '39450-2', '72246-2', '72250-4', '72247-0', '72245-4', '39648-1', '44154-3', '42389-7', '42388-9', '42270-9', '39682-0', '39638-2', '39755-4', '39839-6', '39844-6', '41838-4', '41772-5', '46297-8', '39823-0', '24578-7', '39632-5', '39644-0', '39770-3', '39649-9', '42310-3', '39852-9', '39692-9', '39876-8', '39628-3', '39740-6', '43526-3', '39938-6', '46330-7', '46327-3', '46326-5', '46328-1', '46325-7', '46329-9', '42143-8', '58750-1', '58749-3', '39668-9', '44152-7', '39743-0', '39640-8', '39641-6', '44153-5', '39631-7', '24817-9', '39851-1', '69229-3', '44151-9', '39691-1', '69234-3', '39647-3', '39639-0', '42377-2', '46393-5', '42394-7', '36424-0', '30668-8', '42291-5', '36952-0', '36878-7', '36496-8', '36953-8', '36954-6', '36425-7', '30680-3', '36879-5', '69087-5', '69164-2', '36426-5', '36427-3', '36428-1', '36429-9', '36430-7', '44132-9', '36431-5', '36432-3', '69119-6', '36433-1', '44130-3', '36434-9', '44123-8', '30657-1', '48453-5', '37278-9', '37279-7', '42393-9', '36436-4', '69191-5', '69168-3', '38064-2', '38817-3', '44119-6', '36437-2', '36438-0', '36439-8', '46333-1', '36483-6', '36440-6', '36441-4', '36880-3', '29252-4', '36442-2', '69084-2', '36547-8', '42276-6', '72253-8', '42302-0', '48459-2', '48458-4', '36443-0', '30796-7', '36444-8', '69171-7', '36445-5', '36446-3', '36447-1', '36448-9', '42278-2', '69104-8', '69111-3', '36435-6', '30802-3', '72249-6', '36460-4', '69173-3', '36462-0', '36464-6', '69196-4', '69206-1', '69216-0', '36466-1', '30681-1', '36467-9', '36468-7', '36469-5', '36470-3', '36471-1', '36472-9', '30683-7', '69176-6', '36473-7', '36474-5', '36475-2', '36476-0', '36477-8', '30685-2', '69179-0', '36478-6', '36479-4', '36480-2', '36481-0', '30799-1', '36876-1', '42293-1', '36881-1', '36482-8', '36484-4', '30687-8', '36485-1', '36486-9', '36487-7', '36488-5', '36489-3', '36490-1', '30584-7', '30658-9', '43770-7', '43773-1', '36503-1', '36504-9', '39359-5', '36505-6', '30691-0', '69089-1', '36506-4', '36507-2', '36508-0', '36509-8', '36510-6', '36511-4', '48445-1', '30611-8', '30669-6', '30625-8', '39292-8', '44129-5', '36450-5', '36882-9', '38773-8', '36449-7', '36451-3', '36497-6', '36498-4', '36499-2', '36452-1', '36453-9', '36454-7', '36455-4', '36537-9', '30869-2', '69185-7', '36538-7', '36539-5', '36540-3', '36541-1', '36512-2', '36513-0', '30585-4', '36514-8', '30660-5', '36877-9', '36549-4', '46331-5', '36872-0', '30587-0', '30661-3', '36873-8', '36874-6', '36956-1', '46332-3', '36875-3', '30613-4', '36515-5', '37280-5', '37281-3', '30615-9', '30673-8', '36883-7', '30671-2', '30589-6', '30591-2', '30666-2', '36543-7', '36517-1', '36518-9', '36519-7', '36544-5', '44133-7', '36501-5', '36502-3', '36520-5', '36521-3', '36522-1', '69118-8', '36523-9', '38770-4', '36535-3', '36524-7', '30693-6', '69090-9', '36525-4', '36526-2', '38834-8', '36527-0', '36528-8', '36529-6', '30662-1', '44112-1', '48687-8', '37293-8', '36530-4', '36531-2', '37510-5', '30592-0', '30667-0', '37511-3', '30854-4', '30620-9', '30679-5', '37994-1', '37288-8', '30597-9', '36532-0', '37512-1', '30621-7', '36533-8', '37282-1', '36534-6', '44230-1', '36866-2', '36867-0', '36868-8', '37283-9', '37284-7', '37285-4', '37286-2', '37287-0', '36461-2', '43514-9', '43515-6', '36463-8', '36465-3', '30654-8', '38833-0', '36516-3', '36955-3', '36536-1', '72242-1', '72239-7', '36491-9', '30689-4', '69183-2', '36492-7', '36493-5', '36494-3', '36495-0', '30627-4', '39033-6', '36548-6', '36456-2', '69188-1', '36500-7', '36869-6', '36870-4', '36457-0', '38832-2', '36458-8', '36459-6', '36542-9', '36545-2', '36546-0', '37459-5', '37460-3', '43516-4', '43517-2', '37461-1', '37462-9', '37463-7', '37464-5', '37465-2', '37466-0', '43525-5', '69223-6', '36871-2', '24787-4', '30712-4', '25051-4', '29750-7', '25060-5', '52072-6', '53246-5', '46210-1', '34819-3', '46215-0', '28568-4', '11536-0', '52066-8', '53244-0', '11543-6', '46208-5', '52051-0', '52052-8', '52053-6', '52054-4', '52067-6', '24620-7', '33721-2', '34122-2', '55188-7', '55750-4', '52034-6', '24882-3', '69252-5', '69248-3', '42018-2', '69301-0', '28629-4', '74030-8', '29752-3', '24875-7', '51965-2', '51850-6', '24998-7', '52055-1', '52063-5', '18836-7', '28570-0', '28577-5', '11505-5', '28625-2', '52068-4', '46209-3', '55751-2', '52075-9', '55184-6', '55182-0', '55183-8', '62385-0', '11514-7', '11521-2', '11515-4', '11516-2', '11517-0', '11518-8', '11519-6', '11520-4', '44226-9', '30636-5', '18823-5', '18824-3', '18825-0', '18826-8', '19002-5', '18594-2', '52184-9', '19003-3', '19004-1', '29206-0', '25073-8', '52056-9', '25015-9', '60569-1', '55187-9', '52057-7', '52058-5', '52039-5', '52059-3', '52060-1', '52029-6', '55228-1', '18752-6', '29755-6', '11526-1', '28633-6', '11527-9', '58477-1', '11529-5', '55230-7', '11523-8', '11541-0', '29757-2', '33717-0', '18745-0', '11524-6', '18750-0', '18754-2', '18746-8', '18753-4', '29756-4', '18744-3', '18759-1', '38269-7', '18756-7', '17787-3', '55229-9', '18751-8', '18742-7', '33716-2', '18748-4', '18749-2', '33719-6', '29754-9', '52038-7', '52061-9', '28583-3', '28573-4', '60568-3', '52069-2', '11534-5', '46213-5', '28630-2', '52062-7', '28651-8', '28616-1', '69409-1', '24783-3', '25065-4', '25068-8', '43471-2', '25066-2', '25067-0', '43472-0', '42702-1', '42703-9', '36550-2', '36551-0', '69307-7', '69314-3', '46335-6', '46336-4', '46337-2', '46338-0', '36564-3', '69311-9', '69319-2', '36554-4', '42699-9', '36555-1', '36556-9', '69308-5', '69315-0', '42153-7', '36559-3', '36560-1', '37689-7', '36561-9', '69309-3', '69316-8', '36563-5', '69310-1', '69318-4', '24761-9', '26400-2', '26401-0', '26402-8', '36565-0', '69312-7', '69320-0', '36566-8', '36567-6', '37741-6', '36557-7', '36558-5', '37764-8', '37614-5', '69152-7', '69260-8', '37616-0', '69317-6', '42313-7', '42314-5', '37654-1', '30748-8', '36568-4', '36569-2', '37792-9', '37851-3', '24917-7', '48695-1', '37875-2', '24940-9', '30773-6', '37904-0', '38121-0', '69313-5', '69321-8', '37894-3', '37924-8', '42419-2', '36570-0', '37825-7', '30642-3', '30787-6', '44176-6', '41775-8', '30749-6', '30722-3', '30724-9', '30774-4', '70932-9', '25063-9', '69268-1', '49510-1', '49509-3', '24715-5', '37513-9', '37514-7', '38806-6', '37467-8', '37468-6', '42431-7', '69079-2', '37469-4', '37470-2', '38803-3', '24799-9', '36583-3', '37662-4', '36571-8', '36572-6', '36573-4', '36575-9', '36576-7', '36577-5', '36578-3', '36579-1', '36580-9', '36581-7', '36582-5', '37726-7', '36584-1', '36585-8', '48462-6', '48463-4', '36574-2', '42439-0', '37622-8', '39050-0', '36958-7', '36959-5', '37783-8', '39048-4', '37842-2', '36586-6', '36587-4', '37798-6', '69269-9', '37877-8', '30725-6', '24948-2', '30777-7', '30752-0', '39049-2', '37880-2', '37890-1', '37897-6', '39402-3', '37634-3', '30734-8', '30735-5', '24561-3', '24637-1', '24560-5', '24636-3', '36588-2', '36589-0', '30727-2', '30729-8', '30755-3', '24563-9', '43466-2', '24652-0', '43778-0', '24564-7', '36960-3', '24807-0', '26358-2', '26359-0', '26360-8', '44177-4', '38849-6', '37733-3', '42420-0', '42378-0', '39410-6', '42379-8', '39411-4', '24723-9', '26355-8', '26356-6', '26357-4', '42395-4', '42396-2', '36962-9', '37849-7', '36963-7', '36964-5', '37800-0', '36965-2', '37471-0', '37472-8', '38804-1', '36966-0', '36967-8', '38775-3', '37928-9', '37857-0', '69132-9', '69141-0', '39514-5', '37625-1', '37650-9', '65799-9', '65800-5', '65801-3', '37297-9', '39149-0', '36973-6', '37843-0', '36974-4', '37801-8', '37844-8', '37035-3', '37473-6', '38805-8', '36975-1', '36977-7', '38776-1', '36976-9', '36978-5', '37628-5', '36979-3', '36980-1', '38777-9', '36981-9', '36982-7', '36983-5', '37732-5', '36620-3', '36591-6', '36592-4', '39051-8', '36593-2', '36594-0', '36595-7', '36596-5', '36597-3', '36598-1', '37703-6', '36599-9', '36600-5', '36601-3', '37712-7', '36602-1', '36603-9', '37730-9', '36604-7', '36605-4', '36606-2', '37751-5', '24843-5', '37629-3', '39053-4', '38857-9', '37784-6', '37858-8', '24920-1', '39052-6', '24943-3', '24969-8', '30756-1', '37891-9', '37893-5', '37930-5', '36984-3', '36985-0', '36986-8', '36987-6', '37727-5', '36988-4', '37872-9', '37878-6', '36989-2', '36990-0', '37903-2', '36991-8', '36992-6', '30786-8', '36993-4', '36994-2', '37729-1', '37626-9', '36999-1', '37000-7', '37750-7', '37909-9', '41774-1', '30757-9', '37515-4', '37516-2', '38066-7', '38819-9', '37001-5', '37002-3', '37754-9', '42442-4', '37003-1', '37910-7', '36997-5', '36971-0', '37833-1', '36998-3', '36972-8', '37834-9', '37004-9', '36995-9', '30737-1', '30738-9', '24639-7', '24638-9', '37008-0', '37009-8', '24641-3', '24640-5', '38069-1', '37005-6', '37773-9', '42441-6', '24801-3', '26283-2', '26284-0', '26285-7', '37006-4', '37007-2', '37475-1', '37671-5', '38067-5', '36607-0', '36609-6', '36610-4', '36611-2', '36612-0', '36613-8', '36614-6', '36615-3', '37704-4', '36616-1', '36617-9', '36618-7', '42689-0', '30778-5', '30758-7', '37892-7', '44178-2', '37545-1', '37728-3', '30759-5', '37631-9', '37845-5', '37012-2', '37013-0', '37802-6', '36621-1', '36622-9', '36623-7', '37714-3', '69270-7', '37931-3', '36624-5', '37015-5', '24648-8', '37014-8', '37755-6', '37477-7', '37476-9', '39324-9', '69263-2', '24828-6', '24871-6', '37998-2', '37999-0', '38000-6', '38006-3', '38068-3', '36996-7', '37010-6', '37011-4', '37018-9', '37020-5', '37019-7', '37752-3', '39323-1', '49511-9', '24699-1', '26178-4', '26179-2', '26180-0', '42812-8', '42813-6', '42814-4', '42811-0', '44206-1', '30714-0', '42426-7', '37659-0', '42428-3', '42429-1', '42427-5', '37660-8', '37846-3', '37298-7', '37299-5', '37808-3', '43671-7', '42471-3', '42474-7', '39516-0', '37024-7', '37025-4', '37791-1', '39517-8', '37861-2', '37026-2', '43780-6', '37027-0', '43779-8', '69256-6', '69239-2', '69069-3', '69064-4', '69149-3', '42432-5', '24944-1', '37028-8', '37029-6', '37030-4', '37770-5', '37870-3', '24668-6', '37031-2', '37032-0', '37033-8', '38007-1', '37034-6', '38779-5', '37300-1', '37037-9', '37038-7', '38855-3', '37771-3', '37039-5', '37040-3', '38772-0', '30790-0', '37041-1', '37042-9', '37761-4', '38842-1', '37677-2', '37043-7', '37756-4', '37044-5', '37645-9', '37045-2', '37046-0', '37047-8', '37048-6', '38780-3', '37049-4', '37613-7', '37863-8', '24921-9', '42473-9', '38117-8', '30751-2', '37050-2', '37051-0', '37809-1', '42680-9', '37052-8', '37053-6', '37772-1', '37656-6', '37055-1', '37054-4', '37790-3', '37847-1', '38858-7', '37805-9', '37848-9', '37056-9', '37057-7', '37810-9', '41793-1', '41790-7', '24656-1', '39047-6', '38065-9', '38818-1', '42008-3', '24893-0', '37058-5', '37059-3', '37207-8', '37731-7', '44205-3', '38850-4', '37734-1', '37633-5', '39144-1', '41795-6', '69302-8', '36968-6', '30639-9', '42470-5', '30809-8', '42469-7', '38001-4', '38002-2', '37060-1', '37636-8', '46341-4', '24535-7', '26133-9', '26134-7', '26135-4', '24536-5', '26136-2', '26137-0', '26138-8', '24541-5', '26097-6', '26098-4', '51395-2', '26099-2', '51394-5', '36625-2', '46342-2', '38070-9', '38071-7', '38072-5', '38820-7', '46380-2', '24597-7', '38079-0', '38080-8', '38821-5', '36626-0', '36627-8', '37774-7', '46339-8', '24612-4', '26100-8', '26101-6', '26102-4', '30745-4', '30631-6', '42269-1', '24664-5', '26106-5', '26107-3', '26108-1', '30883-3', '24676-9', '26109-9', '26110-7', '26111-5', '46381-0', '37637-6', '24695-9', '37303-5', '24704-9', '26118-0', '26120-6', '26122-2', '24706-4', '26124-8', '30783-5', '37517-0', '37518-8', '38147-5', '30782-7', '37519-6', '37520-4', '38146-7', '26125-5', '26126-3', '30780-1', '37521-2', '37522-0', '38144-2', '30781-9', '37523-8', '37524-6', '38145-9', '24709-8', '26127-1', '26128-9', '26129-7', '42399-6', '42400-2', '43641-0', '42434-1', '37532-9', '37533-7', '38152-5', '28582-5', '36629-4', '36630-2', '37716-8', '24752-8', '24762-7', '26130-5', '26131-3', '26132-1', '28567-6', '37319-1', '37321-7', '37320-9', '38797-7', '37062-7', '36632-8', '37738-2', '36628-6', '28565-0', '36635-1', '36636-9', '37758-0', '48465-9', '24686-8', '26112-3', '26113-1', '26114-9', '24829-4', '48745-4', '43533-9', '24830-2', '26139-6', '26140-4', '26141-2', '36637-7', '24834-4', '37639-2', '37332-4', '38798-5', '24846-8', '26142-0', '26143-8', '26144-6', '36886-0', '24854-2', '36887-8', '38774-6', '43529-7', '24855-9', '30791-8', '36638-5', '36639-3', '37777-0', '28561-9', '30885-8', '30767-8', '30768-6', '36631-0', '38771-2', '47984-0', '24745-2', '26146-1', '26148-7', '26150-3', '24891-4', '24899-7', '37937-0', '38073-3', '38074-1', '37963-6', '38868-6', '37962-8', '26151-1', '69071-9', '26152-9', '39326-4', '38866-0', '39489-0', '42381-4', '39493-2', '37960-2', '37938-8', '39352-0', '38869-4', '37964-4', '26153-7', '39351-2', '39491-6', '38867-8', '39353-8', '39492-4', '37961-0', '24900-3', '36633-6', '36634-4', '37786-1', '30884-1', '24665-2', '39058-3', '24903-7', '26154-5', '26155-2', '26156-0', '42159-4', '24909-4', '26157-8', '26158-6', '26159-4', '42160-2', '24911-0', '24916-9', '28564-3', '48697-7', '37338-1', '28613-8', '24946-6', '36640-1', '43538-8', '37481-9', '38008-9', '43781-4', '24972-2', '43536-2', '24975-5', '37340-7', '37341-5', '37342-3', '46340-6', '24983-9', '42692-4', '37975-0', '37323-3', '37324-1', '37965-1', '24993-8', '24994-6', '72876-6', '25000-1', '37325-8', '30889-0', '30890-8', '25006-8', '26160-2', '26161-0', '26162-8', '26163-6', '26164-4', '26165-1', '25011-8', '37530-3', '38151-7', '37531-1', '38150-9', '37534-5', '38148-3', '37535-2', '38149-1', '25013-4', '26166-9', '26167-7', '26168-5', '44238-4', '48464-2', '24689-2', '26115-6', '26116-4', '26117-2', '24619-9', '26169-3', '26170-1', '51392-9', '26171-9', '51388-7', '43468-8', '49512-7', '25074-6', '26172-7', '26173-5', '26174-3', '51387-9', '39370-2', '30635-7', '42162-8', '39400-7', '69131-1', '69140-2', '39513-7', '39360-3', '69059-4', '69139-4', '39377-7', '37583-2', '39372-8', '39373-6', '39390-0', '39511-1', '39376-9', '42164-4', '42163-6', '39414-8', '39398-3', '69056-0', '41811-1', '41832-7', '42010-9', '42165-1', '46389-3', '39391-8', '39412-2', '69148-5', '39389-2', '30694-4', '42271-7', '60527-9', '25008-4', '69236-8', '43672-5', '44147-7', '42405-1', '42401-0', '42411-9', '39392-6', '44199-8', '44198-0', '47373-6', '47375-1', '43521-4', '47983-2', '48489-9', '48488-1', '43522-2', '48467-5', '43523-0', '44202-0', '44201-2', '36641-9', '37064-3', '37664-0', '36665-8', '37661-6', '24540-7', '26385-5', '26386-3', '26387-1', '36642-7', '37768-9', '36661-7', '48433-7', '36662-5', '37718-4', '36643-5', '36644-3', '36645-0', '36646-8', '37679-8', '36647-6', '36648-4', '36649-2', '36650-0', '37681-4', '36652-6', '36653-4', '36654-2', '37690-5', '36655-9', '36656-7', '37694-7', '30784-3', '36657-5', '38846-2', '37697-0', '24721-3', '26388-9', '26389-7', '26390-5', '36663-3', '69058-6', '36664-1', '37721-8', '24765-0', '26391-3', '26392-1', '26393-9', '24806-2', '26394-7', '26395-4', '26396-2', '36651-8', '69257-4', '24861-7', '26397-0', '26398-8', '26399-6', '37617-8', '42685-8', '42686-6', '36659-1', '36660-9', '37707-7', '36658-3', '39060-9', '42687-4', '37066-8', '37780-4', '37651-7', '44179-0', '37655-8', '36666-6', '37787-9', '42435-8', '37840-6', '36667-4', '36668-2', '37793-7', '37853-9', '37867-9', '37879-4', '36669-0', '43784-8', '36670-8', '37905-7', '24984-7', '69273-1', '37883-6', '36671-6', '36672-4', '37815-8', '37895-0', '37902-4', '37348-0', '36673-2', '37821-6', '37922-2', '37925-5', '37482-7', '37483-5', '37826-5', '69305-1', '42430-9', '42009-1', '39378-5', '48468-3', '43467-0', '69060-2', '69142-8', '39379-3', '39380-1', '69061-0', '41819-4', '39381-9', '69143-6', '39382-7', '38118-6', '38844-7', '37686-3', '38871-0', '38108-7', '38874-4', '38114-5', '44181-6', '43539-6', '48469-1', '39880-0', '44184-0', '44182-4', '44183-2', '36674-0', '37658-2', '38843-9', '37678-0', '42166-9', '38841-3', '37675-6', '37068-4', '37069-2', '37698-8', '36945-4', '38851-2', '37762-2', '36946-2', '69274-9', '38840-5', '37672-3', '37067-6', '36293-9', '37635-0', '36294-7', '36295-4', '36296-2', '37665-7', '36298-8', '36299-6', '36300-2', '36301-0', '37682-2', '36297-0', '36302-8', '36303-6', '36304-4', '37695-4', '36305-1', '36306-9', '36307-7', '37699-6', '24722-1', '26379-8', '26380-6', '26381-4', '36308-5', '36309-3', '37722-6', '30788-4', '36310-1', '36311-9', '37742-4', '36312-7', '36838-1', '48470-9', '48471-7', '37604-6', '69261-6', '30766-0', '37256-5', '39062-5', '36313-5', '36314-3', '37781-2', '37648-3', '39061-7', '24908-6', '26382-2', '26383-0', '26384-8', '37854-7', '24918-5', '24941-7', '30775-1', '37257-3', '37259-9', '37260-7', '37261-5', '37906-5', '37881-0', '37888-5', '36315-0', '37812-5', '36316-8', '37820-8', '37926-3', '37454-6', '48738-9', '37455-3', '37827-3', '48737-1', '37933-9', '69154-3', '39393-4', '39399-1', '39364-5', '39404-9', '39383-5', '48472-5', '39365-2', '69155-0', '39394-2', '43499-3', '43483-7', '39901-4', '39902-2', '39882-6', '39883-4', '30776-9', '69151-9', '24778-3', '69138-6', '69254-1', '36947-0', '36948-8', '37700-2', '36949-6', '42443-2', '36317-6', '36319-2', '36320-0', '36321-8', '36322-6', '36323-4', '37683-0', '36318-4', '36324-2', '37691-3', '30789-2', '36325-9', '36326-7', '37743-2', '36327-5', '43534-7', '43535-4', '36839-9', '37609-5', '37612-9', '36328-3', '69265-7', '36329-1', '36330-9', '37794-5', '37855-4', '37868-7', '37876-0', '36331-7', '36332-5', '48473-3', '37907-3', '37882-8', '38155-8', '37070-0', '37071-8', '37828-1', '37934-7', '69144-4', '39384-3', '39385-0', '39413-0', '39099-7', '69063-6', '39387-6', '69145-1', '39386-8', '69062-8', '38852-0', '37763-0', '36675-7', '36676-5', '37744-0', '36890-2', '37351-4', '30750-4', '36677-3', '37795-2', '37856-2', '24922-7', '24939-1', '30797-5', '37353-0', '37355-5', '37356-3', '37357-1', '37350-6', '37072-6', '37829-9', '39407-2', '69081-8', '37073-4', '69080-0', '39063-3', '42273-3', '36678-1', '36679-9', '37796-0', '42691-6', '38156-6', '37074-2', '37830-7', '36680-7', '36681-5', '36682-3', '36683-1', '37831-5', '42412-7', '39064-1', '69070-1', '38856-1', '37782-0', '24796-5', '24792-4', '24653-8', '24654-6', '37080-9', '37081-7', '37082-5', '38781-1', '39339-7', '37083-3', '38782-9', '37126-0', '37084-1', '38783-7', '39512-9', '39401-5', '69153-5', '69262-4', '37618-6', '37623-6', '39065-8', '37619-4', '24794-0', '30779-3', '36684-9', '36685-6', '37667-3', '36686-4', '36701-1', '37719-2', '36687-2', '39066-6', '36688-0', '36689-8', '36690-6', '36691-4', '37684-8', '36693-0', '36694-8', '36695-5', '37692-1', '39069-0', '36696-3', '36697-1', '37701-0', '42409-3', '69130-3', '48474-1', '38847-0', '37710-1', '36702-9', '36703-7', '36704-5', '37725-9', '36706-0', '36707-8', '36708-6', '37736-6', '36709-4', '36590-8', '36710-2', '37745-7', '36692-2', '69258-2', '36711-0', '42438-2', '36712-8', '36713-6', '37776-2', '37620-2', '36705-2', '36699-7', '36700-3', '37708-5', '36698-9', '37652-5', '36714-4', '36715-1', '37788-7', '37841-4', '36716-9', '24919-3', '24928-4', '24942-5', '37361-3', '39067-4', '43785-5', '24970-6', '30753-8', '38123-6', '37974-3', '37889-3', '36717-7', '36718-5', '37816-6', '37896-8', '36719-3', '37822-4', '30793-4', '38860-3', '37832-3', '37839-8', '39070-8', '42404-4', '39071-6', '37095-7', '37096-5', '37097-3', '37666-5', '39072-4', '36720-1', '36721-9', '37668-1', '36731-8', '36722-7', '36723-5', '36724-3', '37685-5', '36725-0', '36726-8', '36727-6', '37696-2', '36728-4', '36729-2', '36730-0', '37702-8', '69057-8', '38848-8', '37711-9', '36732-6', '36733-4', '37748-1', '37624-4', '36734-2', '36735-9', '37908-1', '36736-7', '37813-3', '37927-1', '37099-9', '38083-2', '37101-3', '42410-1', '37102-1', '37118-7', '37115-3', '69137-8', '39371-0', '39334-8', '39375-1', '42417-6', '42418-4', '39369-4', '37103-9', '37079-1', '39074-0', '39073-2', '69147-7', '39388-4', '37105-4', '37106-2', '37107-0', '37108-8', '37749-9', '37109-6', '37110-4', '38786-0', '37111-2', '37116-1', '37117-9', '37740-8', '38009-7', '37112-0', '37113-8', '37114-6', '37747-3', '69065-1', '37086-6', '37087-4', '37723-4', '37090-8', '69146-9', '37089-0', '37088-2', '38784-5', '30763-7', '37077-5', '37091-6', '37092-4', '37093-2', '37724-2', '30770-2', '42167-7', '37094-0', '38785-2', '41776-6', '24793-2', '44185-7', '44186-5', '41817-8', '41777-4', '30726-4', '37078-3', '30754-6', '39330-6', '42380-6', '39368-6', '39068-2', '39331-4', '39332-2', '39374-4', '24805-4', '26364-0', '26365-7', '26366-5', '39333-0', '38084-0', '37119-5', '39076-5', '37621-0', '37649-1', '39075-7', '37098-1', '44187-3', '37100-5', '24797-3', '37120-3', '37104-7', '42011-7', '24642-1', '24808-8', '26361-6', '26362-4', '26363-2', '37121-1', '37680-6', '37122-9', '37797-8', '37485-0', '39077-3', '46349-7', '38082-4', '38822-3', '37123-7', '38787-8', '36961-1', '37799-4', '37124-5', '37789-5', '69266-5', '37125-2', '38788-6', '24562-1', '24650-4', '24649-6', '37085-8', '37076-7', '24798-1', '43463-9', '24795-7', '42019-0', '39329-8', '39328-0', '39395-9', '39321-5', '39336-3', '39335-5', '39337-1', '39344-7', '39338-9', '39397-5', '39343-9', '39348-8', '39325-6', '39346-2', '39347-0', '39396-7', '24632-2', '37075-9', '43561-0', '38003-0', '38815-7', '42406-9', '42407-7', '42445-7', '37484-3', '37746-5', '42403-6', '42408-5', '42444-0', '42446-5', '39403-1', '37127-8', '37128-6', '37807-5', '46386-9', '39884-2', '39861-0', '42709-6', '39860-2', '26352-5', '26353-3', '26354-1', '24724-7', '37362-1', '24591-0', '37996-6', '37995-8', '37997-4', '38814-0', '37486-8', '37852-1', '39859-4', '39875-0', '39840-4', '39842-0', '39874-3', '39819-8', '39741-4', '24605-8', '39152-4', '69158-4', '48475-8', '69150-1', '69259-0', '26346-7', '39154-0', '26347-5', '42169-3', '26348-3', '42168-5', '46350-5', '24604-1', '26349-1', '26350-9', '26351-7', '46351-3', '39895-8', '39887-5', '39889-1', '39885-9', '39910-5', '39912-1', '39909-7', '39908-9', '39886-7', '39890-9', '39888-3', '39867-7', '39863-6', '39866-9', '39864-4', '39865-1', '39869-3', '39868-5', '39893-3', '43644-4', '39858-6', '39636-6', '39871-9', '42261-8', '42262-6', '43653-5', '39847-9', '39899-0', '42308-7', '42263-4', '39856-0', '43500-8', '44148-5', '43642-8', '43664-2', '43643-6', '43666-7', '43663-4', '43665-9', '39870-1', '43654-3', '39685-3', '39940-2', '43787-1', '43648-5', '43649-3', '39827-1', '39828-9', '39327-2', '44208-7', '30720-7', '42311-1', '42312-9', '39768-7', '39767-9', '24997-9', '39769-5', '39892-5', '39891-7', '43646-9', '43645-1', '43647-7', '39653-1', '39657-2', '39933-7', '39830-5', '39677-0', '39490-8', '24700-7', '39686-1', '42170-1', '39672-1', '72256-1', '24571-2', '24572-0', '43788-9', '43789-7', '39673-9', '30650-6', '39665-5', '39664-8', '39848-7', '39849-5', '24876-5', '44149-3', '39954-3', '44140-2', '39831-3', '39951-9', '39934-5', '39829-7', '42171-9', '39749-7', '39679-6', '39750-5', '42305-3', '42397-0', '39923-8', '39917-0', '39919-6', '39925-3', '39931-1', '42306-1', '39929-5', '39921-2', '39924-6', '39922-0', '39920-4', '39915-4', '39928-7', '39927-9', '39914-7', '46348-9', '44210-3', '48480-8', '46390-1', '46347-1', '48481-6', '46344-8', '46345-5', '48479-0', '43492-8', '43497-7', '43491-0', '43496-9', '43489-4', '43494-4', '43490-2', '43495-1', '44188-1', '48478-2', '48477-4', '48476-6', '47370-2', '47371-0', '43498-5', '43482-9', '47381-9', '43543-8', '44189-9', '48746-2', '43486-0', '46377-8', '48482-4', '43488-6', '43493-6', '44190-7', '48483-2', '46346-3', '46343-0', '48485-7', '48486-5', '48484-0', '44191-5', '44239-2', '44193-1', '44192-3', '44211-1', '47367-8', '47374-4', '47376-9', '47379-3', '48747-0', '48487-3', '44212-9', '47382-7', '47368-6', '44194-9', '44195-6', '43524-8', '44197-2', '44196-4', '49570-5', '37160-9', '38793-6', '37158-3', '37806-7', '37161-7', '69267-3', '37538-6', '38789-4', '37157-5', '38791-0', '39350-4', '37162-5', '38794-4', '37167-4', '38795-1', '69156-8', '43790-5', '38004-8', '38816-5', '37539-4', '37540-2', '30771-0', '37627-7', '37164-1', '37864-6', '37165-8', '37166-6', '37871-1', '37134-4', '37135-1', '37670-7', '42382-2', '39366-0', '43464-7', '37603-8', '39100-3', '39101-1', '39341-3', '39406-4', '39405-6', '42436-6', '37869-5', '37605-3', '37862-0', '37136-9', '37803-4', '39340-5', '37133-6', '37132-8', '38010-5', '37929-7', '69157-6', '39515-2', '37474-4', '37669-9', '43480-3', '37541-0', '47380-1', '43470-4', '47377-7', '24610-8', '26287-3', '26289-9', '26291-5', '41826-9', '41785-7', '36737-5', '41830-1', '41789-9', '36738-3', '36893-6', '42007-5', '37646-7', '44209-5', '48466-7', '42710-4', '36739-1', '38838-9', '37642-6', '41797-2', '42335-0', '38125-1', '38120-2', '37137-7', '39687-9', '39754-7', '49571-3', '39843-8', '41836-8', '39627-5', '39822-2', '39645-7', '39695-2', '39936-0', '37542-8', '37543-6', '37554-3', '38854-6', '37769-7', '30769-4', '38086-5', '39935-2', '39949-3', '39904-8', '39907-1', '39937-8', '39950-1', '36608-8', '36740-9', '36741-7', '37687-1', '36744-1', '37737-4', '36619-5', '36745-8', '36746-6', '37757-2', '36747-4', '37630-1', '36742-5', '36743-3', '37709-3', '48748-8', '36748-2', '43791-3', '48749-6', '36749-0', '37817-4', '36894-4', '37544-4', '38839-7', '37643-4', '42398-8', '37139-3', '37154-2', '37155-9', '43469-6', '37063-5', '37546-9', '48491-5', '48490-7', '48699-3', '37152-6', '37140-1', '37804-2', '36750-8', '42272-5', '36751-6', '36752-4', '36753-2', '37713-5', '36754-0', '30721-5', '37547-7', '37548-5', '37835-6', '37143-5', '37144-3', '37145-0', '37142-7', '37860-4', '37146-8', '30741-3', '39078-1', '36755-7', '36756-5', '36757-3', '37715-0', '37884-4', '37549-3', '37550-1', '37836-4', '36758-1', '37148-4', '37147-6', '30742-1', '30743-9', '30744-7', '24643-9', '37149-2', '38790-2', '37859-6', '69271-5', '24647-0', '24644-7', '36759-9', '39079-9', '37141-9', '39519-4', '39521-0', '39520-2', '24646-2', '24645-4', '37150-0', '24635-5', '46378-6', '43660-0', '43661-8', '43658-4', '43656-8', '39719-0', '43777-2', '39722-4', '39720-8', '39728-1', '39726-5', '39727-3', '39699-4', '39701-8', '39731-5', '39735-6', '39708-3', '39709-1', '39705-9', '39707-5', '39703-4', '39702-6', '39733-1', '39941-0', '39833-9', '39716-6', '39697-8', '39730-7', '39732-3', '39715-8', '39704-2', '39714-1', '39713-3', '30765-2', '30764-5', '41823-6', '41782-4', '30746-2', '41827-7', '41786-5', '41773-3', '41818-6', '41778-2', '43570-1', '41829-3', '41788-1', '37168-2', '37169-0', '38796-9', '37170-8', '41825-1', '41784-0', '41820-2', '41779-0', '30792-6', '30772-8', '30747-0', '41831-9', '41791-5', '46391-9', '41824-4', '41783-2', '30723-1', '37171-6', '44203-8', '37172-4', '41828-5', '41787-3', '37151-8', '30731-4', '30730-6', '24634-8', '24824-5', '42402-8', '43657-6', '30733-0', '37131-0', '37138-5', '41792-3', '24651-2', '42414-3', '37016-3', '37017-1', '37775-4', '30740-5', '30739-7', '43479-5', '30838-7', '37364-7', '38799-3', '38107-9', '37304-3', '37302-7', '38115-2', '24930-0', '30715-7', '42424-2', '39367-8', '42472-1', '42425-9', '43569-3', '30716-5', '30717-3', '24929-2', '24606-6', '39153-2', '69159-2', '48492-3', '26175-0', '42174-3', '26176-8', '46355-4', '26177-6', '46354-7', '46356-2', '37022-1', '37021-3', '37023-9', '38778-7', '37551-9', '37552-7', '38807-4', '37553-5', '43550-3', '39952-7', '39676-2', '39894-1', '39896-6', '39814-9', '39634-1', '39903-0', '39817-2', '39815-6', '39824-8', '39633-3', '39853-7', '39832-1', '39878-4', '39900-6', '39855-2', '43501-6', '44150-1', '39854-5', '37153-4', '69136-0', '37163-3', '37156-7', '37759-8', '39345-4', '69255-8', '38088-1', '38087-3', '38824-9', '24579-5', '43518-0', '37365-4', '39518-6', '43519-8', '38089-9', '37159-1', '38792-8', '43796-2', '69304-4', '69303-6', '69072-7', '37555-0', '38808-2', '43532-1', '39944-4', '39948-5', '39947-7', '39946-9', '39943-6', '30697-7', '39942-8', '24888-0', '39835-4', '39836-2', '39945-1', '39837-0', '39834-7', '46361-2', '39932-9', '39873-5', '39683-8', '39698-6', '39845-3', '42711-2', '42175-0', '39818-0', '39826-3', '39669-7', '24713-0', '39660-6', '39661-4', '39663-0', '42309-5', '24750-2', '43459-7', '24577-9', '47372-8', '25070-4', '24574-6', '46352-1', '43485-2', '39150-8', '69251-7', '42415-0', '42416-8', '37201-1', '37202-9', '37203-7', '37676-4', '37205-2', '37206-0', '37720-0', '38845-4', '37693-9', '24708-0', '26094-3', '26095-0', '26096-8', '37584-0', '38810-8', '24809-6', '26085-1', '26086-9', '26087-7', '37204-5', '69264-0', '37208-6', '69275-6', '38124-4', '37899-2', '37209-4', '37823-2', '44233-5', '44232-7', '37579-0', '37580-8', '37581-6', '37663-2', '39651-5', '38090-7', '38091-5', '39059-1', '24666-0', '46357-0', '30633-2', '42683-3', '43574-3', '44227-7', '37565-9', '38092-3', '41770-9', '43650-1', '30630-8', '30824-7', '37585-7', '38853-8', '37765-5', '37615-2', '37936-2', '37640-0', '64140-7', '64141-5', '38094-9', '37973-5', '25005-0', '25014-2', '37976-8', '42014-1', '37980-0', '37981-8', '37575-8', '38101-2', '46376-0', '38100-4', '38102-0', '25030-8', '30832-0', '30831-2', '37387-8', '37939-6', '38861-1', '37941-2', '24658-7', '30837-9', '24546-4', '37366-2', '69054-5', '37380-3', '37381-1', '37587-3', '37588-1', '37589-9', '37590-7', '37591-5', '37592-3', '37593-1', '37594-9', '37382-9', '37383-7', '38800-9', '37379-5', '37384-5', '37385-2', '37386-0', '24551-4', '30828-8', '37388-6', '24581-1', '69077-6', '37389-4', '24617-3', '26079-4', '39097-1', '39094-8', '39098-9', '38863-7', '37945-3', '30821-3', '30820-5', '37390-2', '37948-7', '38864-5', '37952-9', '26080-2', '26081-0', '39095-5', '38865-2', '37953-7', '38862-9', '37944-6', '37391-0', '37392-8', '37393-6', '37943-8', '24622-3', '37403-3', '37394-4', '37173-2', '30891-6', '37174-0', '37595-6', '30848-6', '30849-4', '37395-1', '37949-5', '37175-7', '37176-5', '37397-7', '37398-5', '38801-7', '37399-3', '30822-1', '62448-6', '62449-4', '30823-9', '25076-1', '43782-2', '37177-3', '24862-5', '37178-1', '37739-0', '37179-9', '25079-5', '37487-6', '47986-5', '47987-3', '30829-6', '64995-4', '65000-2', '37401-7', '24833-6', '24860-9', '30833-8', '37935-4', '24874-0', '44240-0', '69249-1', '37181-5', '37778-8', '37404-1', '39057-5', '30830-4', '37182-3', '37779-6', '30834-6', '62446-0', '62447-8', '24925-0', '26082-8', '26083-6', '26084-4', '24992-0', '24991-2', '37886-9', '37405-8', '37406-6', '37966-9', '37180-7', '37402-5', '38119-4', '37900-8', '37489-2', '37977-6', '37396-9', '37488-4', '37967-7', '24576-1', '37979-2', '37407-4', '37490-0', '37968-5', '42156-0', '25017-5', '43559-4', '37586-5', '39054-2', '38095-6', '38096-4', '38825-6', '30810-6', '38098-0', '38099-8', '38827-2', '24845-0', '30850-2', '30851-0', '37599-8', '38812-4', '24827-8', '30839-5', '30840-3', '37597-2', '37598-0', '37596-4', '38811-6', '37600-4', '39510-3', '37601-2', '38813-2', '39148-2', '39146-6', '39145-8', '39147-4', '24661-1', '38116-0', '38097-2', '38826-4', '24902-9', '26067-9', '26068-7', '26069-5', '38153-3', '48698-5', '42460-6', '48696-9', '24912-8', '24552-2', '25016-7', '39151-6', '37183-1', '37184-9', '37185-6', '37942-0', '37186-4', '37187-2', '37188-0', '37947-9', '24764-3', '26070-3', '26071-1', '26072-9', '24800-5', '26073-7', '26074-5', '26075-2', '37647-5', '37189-8', '37190-6', '37785-3', '24910-2', '26076-0', '26077-8', '26078-6', '37901-6', '37409-0', '37410-8', '37818-2', '25034-0', '37570-9', '37571-7', '37641-8', '37191-4', '24825-2', '30813-0', '64996-2', '64997-0', '24927-6', '37192-2', '37193-0', '70933-7', '25022-5', '30811-4', '37572-5', '24947-4', '38103-8', '30808-0', '38104-6', '24974-8', '24985-4', '69066-9', '30843-7', '37602-0', '30844-5', '37940-4', '58746-9', '24569-6', '37411-6', '24573-8', '37195-5', '30819-7', '39055-9', '37412-4', '37413-2', '37950-3', '42157-8', '37416-5', '39093-0', '37421-5', '37419-9', '37197-1', '37420-7', '37954-5', '37607-9', '24788-2', '37414-0', '37196-3', '37767-1', '37574-1', '30825-4', '37422-3', '37958-6', '30852-8', '24685-0', '69250-9', '30847-8', '30846-0', '37423-1', '37959-4', '30827-0', '65803-9', '65802-1', '65804-7', '65805-4', '30826-2', '37969-3', '37970-1', '37971-9', '37972-7', '24550-6', '37415-7', '38859-5', '37824-0', '25023-3', '26064-6', '26065-3', '26066-1', '25025-8', '30845-2', '30645-6', '43554-5', '39096-3', '43783-0', '25080-3', '30816-3', '24575-3', '37200-3', '37199-7', '37198-9', '24678-5', '24712-2', '42459-8', '24924-3', '24673-6', '24681-9', '24667-8', '24894-8', '39363-7', '38105-3', '39349-6', '30761-1', '38873-6', '38113-7', '25020-9', '30841-1', '30842-9', '37566-7', '37567-5', '37568-3', '69272-3', '24780-9', '38872-8', '38112-9', '37569-1', '30647-2', '39696-0', '42161-0', '39652-3', '42383-0', '42690-8', '24945-8', '24971-4', '43481-1', '30785-0', '43461-3', '39688-7', '24679-3', '42684-1', '42681-7', '37576-6', '39850-3', '25007-6', '39841-2', '39857-8', '39624-2', '24770-0', '39846-1', '39738-0', '25032-4', '42708-8', '30736-3', '24682-7', '37556-8', '37557-6', '37558-4', '37673-1', '37559-2', '37705-1', '37560-0', '37561-8', '37562-6', '37753-1', '37563-4', '37564-2', '37814-1', '39056-7', '38093-1', '39670-5', '64051-6', '64052-4', '24826-0', '24663-7', '42158-6', '42776-5', '25031-6', '24730-4', '39643-2', '39646-5', '39650-7', '24776-7', '30877-5', '24804-7', '26088-5', '26089-3', '26090-1', '39693-7', '39694-5', '43557-8', '39897-4', '39877-6', '39629-1', '39737-2', '39739-8', '39742-2', '39619-2', '43669-1', '39747-1', '30696-9', '39751-3', '30695-1', '25018-3', '39626-7', '49118-3', '39939-4', '39671-3', '39752-1', '24773-4', '30713-2', '42413-5', '43651-9', '39820-6', '39666-3', '39667-1', '69231-9', '69232-7', '24819-5', '39744-8', '39674-7', '41771-7', '39625-9', '39745-5', '43667-5', '39753-9', '39765-3', '39642-4', '44234-3', '39766-1', '39812-3', '39630-9', '39757-0', '24831-0', '44141-0', '44142-8', '39746-3', '69233-5', '25001-9', '26091-9', '26092-7', '26093-5', '44146-9', '39689-5', '69230-1', '39764-6', '24683-5', '44145-1', '39756-2', '24714-8', '44143-6', '39690-3', '42700-5', '24751-0', '39635-8', '51389-5', '42012-5', '24669-4', '37577-4', '37578-2', '44144-4', '37582-4', '69055-2', '52073-4', '28631-0', '46242-4', '52070-0', '74282-5', '71683-7', '71685-2', '34086-9', '60555-0', '34084-4', '69761-5', '70946-9', '34091-9', '48767-8', '60556-8', '35519-8', '35517-2', '35511-5', '34066-1', '60557-6', '72135-7', '34083-6', '60684-8', '60558-4', '34090-1', '34092-7', '35528-9', '69760-7', '60559-2', '70940-2', '34070-3', '34085-1', '57826-0', '57025-9', '35524-8', '34087-7', '34089-3', '69758-1', '35521-4', '69763-1', '34068-7', '43678-2', '34074-5', '42227-9', '34073-7', '35518-0', '35523-0', '61147-5', '70943-6', '70941-0', '70944-4', '35525-5', '35510-7', '34072-9', '71743-9', '34082-8', '61146-7', '71744-7', '69719-3', '69670-8', '34069-5', '72090-4', '64123-3', '71446-9', '60685-5', '73815-3', '64124-1', '34067-9', '34076-0', '69730-0', '59845-8', '60560-0', '62387-6', '34079-4', '34075-2', '70945-1', '70939-4', '66105-8', '74045-6', '57027-5', '43679-0', '49489-8', '43680-8', '34078-6', '34080-2', '61149-1', '70942-8', '70934-5', '70948-5', '70935-2', '60561-8', '34088-5', '51941-3', '51947-0', '51948-8', '51945-4', '51944-7', '51943-9', '51942-1', '51946-2', '34081-0', '43681-6', '66106-6', '43682-4', '59772-4', '60683-0', '71681-1', '71684-5', '71686-0', '71682-9', '71687-8', '71688-6', '57026-7', '69669-0', '59769-0', '42232-9', '42228-7', '57059-8', '59774-0', '59775-7', '59770-8', '59776-5', '59771-6', '59768-2', '59773-2', '35526-3', '35522-2', '57827-8', '43683-2', '34093-5', '70938-6', '69759-9', '48779-3', '48780-1', '42231-1', '42230-3', '38056-8', '42229-5', '69718-5', '35520-6', '44425-7', '35515-6', '35514-9', '61150-9', '35527-1', '55122-6', '34077-8', '35516-4', '35513-1', '42796-3', '35512-3', '69762-3', '43684-0', '54433-8', '70936-0', '43685-7', '34071-1', '74477-1', '74479-7', '74476-3', '74480-5', '74478-9', '42566-0', '21862-8', '69764-9', '48766-0', '70949-3', '60572-5', '60573-3', '60574-1', '73983-9', '40811-2', '29112-0', '29111-2', '72169-6', '44943-9', '11206-0', '26988-6', '50081-9', '57553-0', '57552-2', '57551-4', '53347-1', '1656-8', '42855-7', '16110-9', '40818-7', '53348-9', '25561-2', '55808-0', '56611-7', '56608-3', '57493-9', '40816-1', '56602-6', '56613-3', '56609-1', '56612-5', '56603-4', '57492-1', '56556-4', '56604-2', '56610-9', '56605-9', '59987-8', '59986-0', '59985-2', '59984-5', '56555-6', '16294-1', '57491-3', '56606-7', '13480-9', '44729-2', '69799-5', '57562-1', '57561-3', '57560-5', '72510-1', '72509-3' ],
-
status: [ 'current', 'superseded', 'entered-in-error' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec relatesTo
-
1
class DocumentReferenceRelatesToComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
code: [ 'replaces', 'transforms', 'signs', 'appends' ]
-
}
-
-
1
field :code, type: String
-
1
validates_presence_of :code
-
1
embeds_one :target, class_name:'FHIR::Reference'
-
1
validates_presence_of :target
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec content
-
1
class DocumentReferenceContentComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
format: [ 'urn:ihe:pcc:handp:2008', 'urn:ihe:pcc:xphr:2007', 'urn:ihe:pcc:aps:2007', 'urn:ihe:pcc:xds-ms:2007', 'urn:ihe:pcc:xphr:2007', 'urn:ihe:pcc:edr:2007', 'urn:ihe:pcc:edes:2007', 'urn:ihe:pcc:apr:handp:2008', 'urn:ihe:pcc:apr:lab:2008', 'urn:ihe:pcc:apr:edu:2008', 'urn:ihe:pcc:irc:2008', 'urn:ihe:pcc:crc:2008', 'urn:ihe:pcc:cm:2008', 'urn:ihe:pcc:ic:2009', 'urn:ihe:pcc:tn:2007', 'urn:ihe:pcc:nn:2007', 'urn:ihe:pcc:ctn:2007', 'urn:ihe:pcc:edpn:2007', 'urn:ihe:pcc:hp:2008', 'urn:ihe:pcc:ldhp:2009', 'urn:ihe:pcc:lds:2009', 'urn:ihe:pcc:mds:2009', 'urn:ihe:pcc:nds:2010', 'urn:ihe:pcc:ppvs:2010', 'urn:ihe:pcc:trs:2011', 'urn:ihe:pcc:ets:2011', 'urn:ihe:pcc:its:2011', 'urn:ihe:iti:bppc:2007', 'urn:ihe:iti:bppc-sd:2007', 'urn:ihe:iti:xdw:2011:workflowDoc', 'urn:ihe:iti:dsg:detached:2014', 'urn:ihe:iti:dsg:enveloping:2014', 'urn:ihe:iti:xds-sd:pdf:2008', 'urn:ihe:iti:xds-sd:text:2008', 'urn:ihe:lab:xd-lab:2008', 'urn:ihe:rad:TEXT', 'urn:ihe:rad:PDF', 'urn:ihe:rad:CDA:ImagingReportStructuredHeadings:2013', 'urn:ihe:card:imaging:2011', 'urn:ihe:card:CRC:2012', 'urn:ihe:card:EPRC-IE:2014', 'urn:ihe:dent:TEXT', 'urn:ihe:dent:PDF', 'urn:ihe:dent:CDA:ImagingReportStructuredHeadings:2013', 'urn:ihe:pat:apsr:all:2010', 'urn:ihe:pat:apsr:cancer:all:2010', 'urn:ihe:pat:apsr:cancer:breast:2010', 'urn:ihe:pat:apsr:cancer:colon:2010', 'urn:ihe:pat:apsr:cancer:prostate:2010', 'urn:ihe:pat:apsr:cancer:thyroid:2010', 'urn:ihe:pat:apsr:cancer:lung:2010', 'urn:ihe:pat:apsr:cancer:skin:2010', 'urn:ihe:pat:apsr:cancer:kidney:2010', 'urn:ihe:pat:apsr:cancer:cervix:2010', 'urn:ihe:pat:apsr:cancer:endometrium:2010', 'urn:ihe:pat:apsr:cancer:ovary:2010', 'urn:ihe:pat:apsr:cancer:esophagus: 2010', 'urn:ihe:pat:apsr:cancer:stomach: 2010', 'urn:ihe:pat:apsr:cancer:liver:2010', 'urn:ihe:pat:apsr:cancer:pancreas: 2010', 'urn:ihe:pat:apsr:cancer:testis:2010', 'urn:ihe:pat:apsr:cancer:urinary_bladder:2010', 'urn:ihe:pat:apsr:cancer:lip_oral_cavity:2010', 'urn:ihe:pat:apsr:cancer:pharynx:2010', 'urn:ihe:pat:apsr:cancer:salivary_gland:2010', 'urn:ihe:pat:apsr:cancer:larynx:2010', 'urn:ihe:pharm:pre:2010', 'urn:ihe:pharm:padv:2010', 'urn:ihe:pharm:dis:2010', 'urn:ihe:pharm:pml:2013', 'urn:hl7-org:sdwg:ccda-structuredBody:1.1', 'urn:hl7-org:sdwg:ccda-nonXMLBody:1.1' ]
-
}
-
-
1
embeds_one :attachment, class_name:'FHIR::Attachment'
-
1
validates_presence_of :attachment
-
1
embeds_many :format, class_name:'FHIR::Coding'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec related
-
1
class DocumentReferenceContextRelatedComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :ref, class_name:'FHIR::Reference'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec context
-
1
class DocumentReferenceContextComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
facilityType: [ '82242000', '225732001', '79993009', '32074000', '4322002', '224687002', '62480006', '80522000', '36125001', '48311003', '284546000', '42665001', '45618002', '418518002', '73770003', '69362002', '52668009', '360957003', '10206005', '37550003', '73644007', '31628002', '58482006', '90484001', '1814000', '22549003', '56293002', '360966004', '2849009', '14866005', '38238005', '56189001', '89972002', '78088001', '78001009', '23392004', '36293008', '3729002', '5584006', '37546005', '57159002', '331006', '50569004', '79491001', '33022008', '19602009', '39350007', '83891005', '394759007', '405607001', '309900005', '275576008', '10531005', '91154008', '41844007', '45899008', '51563005', '1773006', '72311000', '6827000', '309898008', '39913001', '77931003', '25681007', '20078004', '46224007', '81234003', '35971002', '11424001', '409519008', '901005', '2081004', '59374000', '413456002', '413817003', '310205006', '419955002', '272501009', '394777002' ],
-
practiceSetting: [ '408467006', '394577000', '394578005', '421661004', '408462000', '394579002', '394804000', '394580004', '394803006', '408480009', '408454008', '394809005', '394592004', '394600006', '394601005', '394581000', '408478003', '394812008', '408444009', '394582007', '408475000', '410005002', '394583002', '419772000', '394584008', '408443003', '394802001', '394915009', '394814009', '394808002', '394811001', '408446006', '394586005', '394916005', '408472002', '394597005', '394598000', '394807007', '419192003', '408468001', '394593009', '394813003', '410001006', '394589003', '394591006', '394599008', '394649004', '408470005', '394585009', '394821009', '422191005', '394594003', '416304004', '418960008', '394882004', '394806003', '394588006', '408459003', '394607009', '419610006', '418058008', '420208008', '418652005', '418535003', '418862001', '419365004', '418002000', '419983000', '419170002', '419472004', '394539006', '420112009', '409968004', '394587001', '394913002', '408440000', '418112009', '419815003', '394914008', '408455009', '394602003', '408447002', '394810000', '408450004', '408476004', '408469009', '408466002', '408471009', '408464004', '408441001', '408465003', '394605001', '394608004', '408461007', '408460008', '408460008', '394606000', '408449004', '394608004', '418018006', '394604002', '394609007', '408474001', '394610002', '394611003', '408477008', '394801008', '408463005', '419321007', '394576009', '394590007', '409967009', '408448007', '419043006', '394612005', '394733009', '394732004' ]
-
}
-
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
embeds_many :event, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
embeds_one :facilityType, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :practiceSetting, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :sourcePatientInfo, class_name:'FHIR::Reference'
-
1
embeds_many :related, class_name:'FHIR::DocumentReference::DocumentReferenceContextRelatedComponent'
-
end
-
-
1
embeds_one :masterIdentifier, class_name:'FHIR::Identifier'
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :fhirType
-
1
embeds_one :fhirClass, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :author, class_name:'FHIR::Reference'
-
1
embeds_one :custodian, class_name:'FHIR::Reference'
-
1
embeds_one :authenticator, class_name:'FHIR::Reference'
-
1
field :created, type: String
-
1
validates :created, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :indexed, type: String
-
1
validates :indexed, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
1
validates_presence_of :indexed
-
1
field :status, type: String
-
1
validates :status, :inclusion => { in: VALID_CODES[:status] }
-
1
validates_presence_of :status
-
1
embeds_one :docStatus, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :relatesTo, class_name:'FHIR::DocumentReference::DocumentReferenceRelatesToComponent'
-
1
field :description, type: String
-
1
embeds_many :securityLabel, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :content, class_name:'FHIR::DocumentReference::DocumentReferenceContentComponent'
-
1
validates_presence_of :content
-
1
embeds_one :context, class_name:'FHIR::DocumentReference::DocumentReferenceContextComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class ElementDefinition
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::ElementDefinition
-
-
-
1
VALID_CODES = {
-
representation: [ 'xmlAttr' ]
-
}
-
-
1
ANY_TYPES = [ 'defaultValue', 'fixed', 'pattern', 'example', 'minValue', 'maxValue' ]
-
-
# This is an ugly hack to deal with embedded structures in the spec slicing
-
1
class ElementDefinitionSlicingComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
rules: [ 'closed', 'open', 'openAtEnd' ]
-
}
-
-
1
field :discriminator, type: Array # Array of Strings
-
1
field :description, type: String
-
1
field :ordered, type: Boolean
-
1
field :rules, type: String
-
1
validates_presence_of :rules
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec base
-
1
class ElementDefinitionBaseComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :path, type: String
-
1
validates_presence_of :path
-
1
field :min, type: Integer
-
1
validates_presence_of :min
-
1
field :max, type: String
-
1
validates_presence_of :max
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec fhirType
-
1
class TypeRefComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
aggregation: [ 'contained', 'referenced', 'bundled' ]
-
}
-
-
1
field :code, type: String
-
1
validates_presence_of :code
-
1
field :profile, type: Array # Array of Strings
-
1
field :aggregation, type: Array # Array of Strings
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec constraint
-
1
class ElementDefinitionConstraintComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
severity: [ 'error', 'warning' ]
-
}
-
-
1
field :key, type: String
-
1
validates_presence_of :key
-
1
field :requirements, type: String
-
1
field :severity, type: String
-
1
validates_presence_of :severity
-
1
field :human, type: String
-
1
validates_presence_of :human
-
1
field :xpath, type: String
-
1
validates_presence_of :xpath
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec binding
-
1
class ElementDefinitionBindingComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
strength: [ 'required', 'extensible', 'preferred', 'example' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
valueSet: [ 'valueSetUri', 'valueSetReference' ]
-
}
-
-
1
field :strength, type: String
-
1
validates :strength, :inclusion => { in: VALID_CODES[:strength] }
-
1
validates_presence_of :strength
-
1
field :description, type: String
-
1
field :valueSetUri, type: String
-
1
embeds_one :valueSetReference, class_name:'FHIR::Reference'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec mapping
-
1
class ElementDefinitionMappingComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :fhirIdentity, type: String
-
1
validates_presence_of :fhirIdentity
-
1
field :language, type: String
-
1
field :map, type: String
-
1
validates_presence_of :map
-
end
-
-
1
field :path, type: String
-
1
validates_presence_of :path
-
1
field :representation, type: Array # Array of Strings
-
1
field :name, type: String
-
1
field :label, type: String
-
1
embeds_many :code, class_name:'FHIR::Coding'
-
1
embeds_one :slicing, class_name:'FHIR::ElementDefinition::ElementDefinitionSlicingComponent'
-
1
field :short, type: String
-
1
field :definition, type: String
-
1
field :comments, type: String
-
1
field :requirements, type: String
-
1
field :alias, type: Array # Array of Strings
-
1
field :min, type: Integer
-
1
field :max, type: String
-
1
embeds_one :base, class_name:'FHIR::ElementDefinition::ElementDefinitionBaseComponent'
-
1
embeds_many :fhirType, class_name:'FHIR::ElementDefinition::TypeRefComponent'
-
1
field :nameReference, type: String
-
1
field :defaultValue, type: FHIR::AnyType
-
1
field :meaningWhenMissing, type: String
-
1
field :fixed, type: FHIR::AnyType
-
1
field :pattern, type: FHIR::AnyType
-
1
field :example, type: FHIR::AnyType
-
1
field :minValue, type: FHIR::AnyType
-
1
field :maxValue, type: FHIR::AnyType
-
1
field :maxLength, type: Integer
-
1
field :condition, type: Array # Array of Strings
-
1
embeds_many :constraint, class_name:'FHIR::ElementDefinition::ElementDefinitionConstraintComponent'
-
1
field :mustSupport, type: Boolean
-
1
field :isModifier, type: Boolean
-
1
field :isSummary, type: Boolean
-
1
embeds_one :binding, class_name:'FHIR::ElementDefinition::ElementDefinitionBindingComponent'
-
1
embeds_many :mapping, class_name:'FHIR::ElementDefinition::ElementDefinitionMappingComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class EligibilityRequest
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::EligibilityRequest
-
-
1
SEARCH_PARAMS = [
-
'identifier'
-
]
-
-
1
VALID_CODES = {
-
ruleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
originalRuleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ]
-
}
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :ruleset, class_name:'FHIR::Coding'
-
1
embeds_one :originalRuleset, class_name:'FHIR::Coding'
-
1
field :created, type: String
-
1
validates :created, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :target, class_name:'FHIR::Reference'
-
1
embeds_one :provider, class_name:'FHIR::Reference'
-
1
embeds_one :organization, class_name:'FHIR::Reference'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class EligibilityResponse
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::EligibilityResponse
-
-
1
SEARCH_PARAMS = [
-
'identifier'
-
]
-
-
1
VALID_CODES = {
-
ruleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
originalRuleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
outcome: [ 'complete', 'error' ]
-
}
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :request, class_name:'FHIR::Reference'
-
1
field :outcome, type: String
-
1
validates :outcome, :inclusion => { in: VALID_CODES[:outcome], :allow_nil => true }
-
1
field :disposition, type: String
-
1
embeds_one :ruleset, class_name:'FHIR::Coding'
-
1
embeds_one :originalRuleset, class_name:'FHIR::Coding'
-
1
field :created, type: String
-
1
validates :created, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :organization, class_name:'FHIR::Reference'
-
1
embeds_one :requestProvider, class_name:'FHIR::Reference'
-
1
embeds_one :requestOrganization, class_name:'FHIR::Reference'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Encounter
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Encounter
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'identifier',
-
'reason',
-
'episodeofcare',
-
'participant-type',
-
'incomingreferral',
-
'practitioner',
-
'length',
-
'appointment',
-
'part-of',
-
'procedure',
-
'type',
-
'participant',
-
'condition',
-
'patient',
-
'location-period',
-
'location',
-
'indication',
-
'special-arrangement',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
fhirClass: [ 'inpatient', 'outpatient', 'ambulatory', 'emergency', 'home', 'field', 'daytime', 'virtual', 'other' ],
-
priority: [ 'imm', 'emg', 'urg', 's-urg', 'no-urg' ],
-
fhirType: [ 'ADMS', 'BD/BM-clin', 'CCS60', 'OKI' ],
-
status: [ 'planned', 'arrived', 'in-progress', 'onleave', 'finished', 'cancelled' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec statusHistory
-
1
class EncounterStatusHistoryComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
status: [ 'planned', 'arrived', 'in-progress', 'onleave', 'finished', 'cancelled' ]
-
}
-
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
validates_presence_of :period
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec participant
-
1
class EncounterParticipantComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirType: [ 'translator', 'emergency', 'SPRF', 'PPRF', 'PART' ]
-
}
-
-
1
embeds_many :fhirType, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
embeds_one :individual, class_name:'FHIR::Reference'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec hospitalization
-
1
class EncounterHospitalizationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
specialArrangement: [ 'wheel', 'stret', 'int', 'att', 'dog' ],
-
dietPreference: [ 'vegetarian', 'dairy-free', 'nut-free', 'gluten-free', 'vegan', 'halal', 'kosher' ],
-
specialCourtesy: [ 'EXT', 'NRM', 'PRF', 'STF', 'VIP', 'UNK' ],
-
dischargeDisposition: [ 'home', 'other-hcf', 'hosp', 'long', 'aadvice', 'exp', 'psy', 'rehab', 'oth' ],
-
admitSource: [ 'hosp-trans', 'emd', 'outp', 'born', 'gp', 'mp', 'nursing', 'psych', 'rehab', 'other' ]
-
}
-
-
1
embeds_one :preAdmissionIdentifier, class_name:'FHIR::Identifier'
-
1
embeds_one :origin, class_name:'FHIR::Reference'
-
1
embeds_one :admitSource, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :admittingDiagnosis, class_name:'FHIR::Reference'
-
1
embeds_one :reAdmission, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :dietPreference, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :specialCourtesy, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :specialArrangement, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :destination, class_name:'FHIR::Reference'
-
1
embeds_one :dischargeDisposition, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :dischargeDiagnosis, class_name:'FHIR::Reference'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec location
-
1
class EncounterLocationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
status: [ 'planned', 'active', 'reserved', 'completed' ]
-
}
-
-
1
embeds_one :location, class_name:'FHIR::Reference'
-
1
validates_presence_of :location
-
1
field :status, type: String
-
1
embeds_one :period, class_name:'FHIR::Period'
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
embeds_many :statusHistory, class_name:'FHIR::Encounter::EncounterStatusHistoryComponent'
-
1
field :fhirClass, type: String
-
1
embeds_many :fhirType, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :priority, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
embeds_many :episodeOfCare, class_name:'FHIR::Reference'
-
1
embeds_many :incomingReferral, class_name:'FHIR::Reference'
-
1
embeds_many :participant, class_name:'FHIR::Encounter::EncounterParticipantComponent'
-
1
embeds_one :appointment, class_name:'FHIR::Reference'
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
embeds_one :length, class_name:'FHIR::Quantity'
-
1
embeds_many :reason, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :indication, class_name:'FHIR::Reference'
-
1
embeds_one :hospitalization, class_name:'FHIR::Encounter::EncounterHospitalizationComponent'
-
1
embeds_many :location, class_name:'FHIR::Encounter::EncounterLocationComponent'
-
1
embeds_one :serviceProvider, class_name:'FHIR::Reference'
-
1
embeds_one :partOf, class_name:'FHIR::Reference'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class EnrollmentRequest
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::EnrollmentRequest
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'subject',
-
'patient'
-
]
-
-
1
VALID_CODES = {
-
ruleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
originalRuleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
relationship: [ '1', '2', '3', '4', '5' ]
-
}
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :ruleset, class_name:'FHIR::Coding'
-
1
embeds_one :originalRuleset, class_name:'FHIR::Coding'
-
1
field :created, type: String
-
1
validates :created, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :target, class_name:'FHIR::Reference'
-
1
embeds_one :provider, class_name:'FHIR::Reference'
-
1
embeds_one :organization, class_name:'FHIR::Reference'
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
validates_presence_of :subject
-
1
embeds_one :coverage, class_name:'FHIR::Reference'
-
1
validates_presence_of :coverage
-
1
embeds_one :relationship, class_name:'FHIR::Coding'
-
1
validates_presence_of :relationship
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class EnrollmentResponse
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::EnrollmentResponse
-
-
1
SEARCH_PARAMS = [
-
'identifier'
-
]
-
-
1
VALID_CODES = {
-
ruleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
originalRuleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
outcome: [ 'complete', 'error' ]
-
}
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :request, class_name:'FHIR::Reference'
-
1
field :outcome, type: String
-
1
validates :outcome, :inclusion => { in: VALID_CODES[:outcome], :allow_nil => true }
-
1
field :disposition, type: String
-
1
embeds_one :ruleset, class_name:'FHIR::Coding'
-
1
embeds_one :originalRuleset, class_name:'FHIR::Coding'
-
1
field :created, type: String
-
1
validates :created, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :organization, class_name:'FHIR::Reference'
-
1
embeds_one :requestProvider, class_name:'FHIR::Reference'
-
1
embeds_one :requestOrganization, class_name:'FHIR::Reference'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class EpisodeOfCare
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::EpisodeOfCare
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'identifier',
-
'condition',
-
'incomingreferral',
-
'patient',
-
'organization',
-
'team-member',
-
'type',
-
'care-manager',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'planned', 'waitlist', 'active', 'onhold', 'finished', 'cancelled' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec statusHistory
-
1
class EpisodeOfCareStatusHistoryComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
status: [ 'planned', 'waitlist', 'active', 'onhold', 'finished', 'cancelled' ]
-
}
-
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
validates_presence_of :period
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec careTeam
-
1
class EpisodeOfCareCareTeamComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_many :role, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
embeds_one :member, class_name:'FHIR::Reference'
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
embeds_many :statusHistory, class_name:'FHIR::EpisodeOfCare::EpisodeOfCareStatusHistoryComponent'
-
1
embeds_many :fhirType, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :condition, class_name:'FHIR::Reference'
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
validates_presence_of :patient
-
1
embeds_one :managingOrganization, class_name:'FHIR::Reference'
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
embeds_many :referralRequest, class_name:'FHIR::Reference'
-
1
embeds_one :careManager, class_name:'FHIR::Reference'
-
1
embeds_many :careTeam, class_name:'FHIR::EpisodeOfCare::EpisodeOfCareCareTeamComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class ExplanationOfBenefit
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::ExplanationOfBenefit
-
-
1
SEARCH_PARAMS = [
-
'identifier'
-
]
-
-
1
VALID_CODES = {
-
ruleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
originalRuleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
outcome: [ 'complete', 'error' ]
-
}
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :request, class_name:'FHIR::Reference'
-
1
field :outcome, type: String
-
1
validates :outcome, :inclusion => { in: VALID_CODES[:outcome], :allow_nil => true }
-
1
field :disposition, type: String
-
1
embeds_one :ruleset, class_name:'FHIR::Coding'
-
1
embeds_one :originalRuleset, class_name:'FHIR::Coding'
-
1
field :created, type: String
-
1
validates :created, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :organization, class_name:'FHIR::Reference'
-
1
embeds_one :requestProvider, class_name:'FHIR::Reference'
-
1
embeds_one :requestOrganization, class_name:'FHIR::Reference'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Extension
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Extension
-
-
1
ANY_TYPES = [ 'value' ]
-
-
1
field :url, type: String
-
1
validates_presence_of :url
-
1
field :value, type: FHIR::AnyType
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class FamilyMemberHistory
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::FamilyMemberHistory
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'identifier',
-
'code',
-
'gender',
-
'patient',
-
'relationship'
-
]
-
-
1
VALID_CODES = {
-
gender: [ 'male', 'female', 'other', 'unknown' ],
-
status: [ 'partial', 'completed', 'entered-in-error', 'health-unknown' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
deceased: [ 'deceasedBoolean', 'deceasedQuantity', 'deceasedRange', 'deceasedDate', 'deceasedString' ],
-
born: [ 'bornPeriod', 'bornDate', 'bornString' ],
-
age: [ 'ageQuantity', 'ageRange', 'ageString' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec condition
-
1
class FamilyMemberHistoryConditionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
onset: [ 'onsetQuantity', 'onsetRange', 'onsetPeriod', 'onsetString' ]
-
}
-
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :code
-
1
embeds_one :outcome, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :onsetQuantity, class_name:'FHIR::Quantity'
-
1
embeds_one :onsetRange, class_name:'FHIR::Range'
-
1
embeds_one :onsetPeriod, class_name:'FHIR::Period'
-
1
field :onsetString, type: String
-
1
embeds_one :note, class_name:'FHIR::Annotation'
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
validates_presence_of :patient
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
field :name, type: String
-
1
embeds_one :relationship, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :relationship
-
1
field :gender, type: String
-
1
validates :gender, :inclusion => { in: VALID_CODES[:gender], :allow_nil => true }
-
1
embeds_one :bornPeriod, class_name:'FHIR::Period'
-
1
field :bornDate, type: String
-
1
validates :bornDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
1
field :bornString, type: String
-
1
embeds_one :ageQuantity, class_name:'FHIR::Quantity'
-
1
embeds_one :ageRange, class_name:'FHIR::Range'
-
1
field :ageString, type: String
-
1
field :deceasedBoolean, type: Boolean
-
1
embeds_one :deceasedQuantity, class_name:'FHIR::Quantity'
-
1
embeds_one :deceasedRange, class_name:'FHIR::Range'
-
1
field :deceasedDate, type: String
-
1
validates :deceasedDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
1
field :deceasedString, type: String
-
1
embeds_one :note, class_name:'FHIR::Annotation'
-
1
embeds_many :condition, class_name:'FHIR::FamilyMemberHistory::FamilyMemberHistoryConditionComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Flag
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Flag
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'subject',
-
'patient',
-
'author',
-
'encounter'
-
]
-
-
1
VALID_CODES = {
-
category: [ 'diet', 'drug', 'lab', 'admin', 'contact' ],
-
status: [ 'active', 'inactive', 'entered-in-error' ]
-
}
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :category, class_name:'FHIR::CodeableConcept'
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
validates_presence_of :subject
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
embeds_one :author, class_name:'FHIR::Reference'
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :code
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Goal
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Goal
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'patient',
-
'subject',
-
'targetdate',
-
'category',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
statusReason: [ 'surgery', 'life-event', 'replaced', 'patient-request' ],
-
category: [ 'dietary', 'safety', 'behavioral', 'nursing', 'physiotherapy' ],
-
priority: [ 'high', 'medium', 'low' ],
-
startDate: [ '32485007', '308283009', '442137000', '386216000' ],
-
status: [ 'proposed', 'planned', 'accepted', 'rejected', 'in-progress', 'achieved', 'sustaining', 'on-hold', 'cancelled' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
start: [ 'startDate', 'startCodeableConcept' ],
-
target: [ 'targetDate', 'targetQuantity' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec outcome
-
1
class GoalOutcomeComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
result: [ 'resultCodeableConcept', 'resultReference' ]
-
}
-
-
1
embeds_one :resultCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :resultReference, class_name:'FHIR::Reference'
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
field :startDate, type: String
-
1
validates :startDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
1
embeds_one :startCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
field :targetDate, type: String
-
1
validates :targetDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
1
embeds_one :targetQuantity, class_name:'FHIR::Quantity'
-
1
embeds_many :category, class_name:'FHIR::CodeableConcept'
-
1
field :description, type: String
-
1
validates_presence_of :description
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
field :statusDate, type: String
-
1
validates :statusDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
1
embeds_one :statusReason, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :author, class_name:'FHIR::Reference'
-
1
embeds_one :priority, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :addresses, class_name:'FHIR::Reference'
-
1
embeds_many :note, class_name:'FHIR::Annotation'
-
1
embeds_many :outcome, class_name:'FHIR::Goal::GoalOutcomeComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Group
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Group
-
-
1
SEARCH_PARAMS = [
-
'actual',
-
'identifier',
-
'characteristic-value',
-
'code',
-
'member',
-
'exclude',
-
'type',
-
'value',
-
'characteristic'
-
]
-
-
1
VALID_CODES = {
-
fhirType: [ 'person', 'animal', 'practitioner', 'device', 'medication', 'substance' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec characteristic
-
1
class GroupCharacteristicComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
value: [ 'valueCodeableConcept', 'valueBoolean', 'valueQuantity', 'valueRange' ]
-
}
-
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :code
-
1
embeds_one :valueCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :valueCodeableConcept
-
1
field :valueBoolean, type: Boolean
-
1
validates_presence_of :valueBoolean
-
1
embeds_one :valueQuantity, class_name:'FHIR::Quantity'
-
1
validates_presence_of :valueQuantity
-
1
embeds_one :valueRange, class_name:'FHIR::Range'
-
1
validates_presence_of :valueRange
-
1
field :exclude, type: Boolean
-
1
validates_presence_of :exclude
-
1
embeds_one :period, class_name:'FHIR::Period'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec member
-
1
class GroupMemberComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :entity, class_name:'FHIR::Reference'
-
1
validates_presence_of :entity
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
field :inactive, type: Boolean
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :fhirType, type: String
-
1
validates_presence_of :fhirType
-
1
field :actual, type: Boolean
-
1
validates_presence_of :actual
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
field :name, type: String
-
1
field :quantity, type: Integer
-
1
embeds_many :characteristic, class_name:'FHIR::Group::GroupCharacteristicComponent'
-
1
embeds_many :member, class_name:'FHIR::Group::GroupMemberComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class HealthcareService
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::HealthcareService
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'servicecategory',
-
'servicetype',
-
'organization',
-
'name',
-
'programname',
-
'location',
-
'characteristic'
-
]
-
-
1
VALID_CODES = {
-
serviceProvisionCode: [ 'free', 'disc', 'cost' ],
-
referralMethod: [ 'fax', 'phone', 'elec', 'semail', 'mail' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec serviceType
-
1
class ServiceTypeComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :fhirType
-
1
embeds_many :specialty, class_name:'FHIR::CodeableConcept'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec availableTime
-
1
class HealthcareServiceAvailableTimeComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
daysOfWeek: [ 'mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun' ]
-
}
-
-
1
field :daysOfWeek, type: Array # Array of Strings
-
1
field :allDay, type: Boolean
-
1
field :availableStartTime, type: String
-
1
validates :availableStartTime, :allow_nil => true, :format => { with: /\A([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?\Z/ }
-
1
field :availableEndTime, type: String
-
1
validates :availableEndTime, :allow_nil => true, :format => { with: /\A([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?\Z/ }
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec notAvailable
-
1
class HealthcareServiceNotAvailableComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :description, type: String
-
1
validates_presence_of :description
-
1
embeds_one :during, class_name:'FHIR::Period'
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :providedBy, class_name:'FHIR::Reference'
-
1
embeds_one :serviceCategory, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :serviceType, class_name:'FHIR::HealthcareService::ServiceTypeComponent'
-
1
embeds_one :location, class_name:'FHIR::Reference'
-
1
validates_presence_of :location
-
1
field :serviceName, type: String
-
1
field :comment, type: String
-
1
field :extraDetails, type: String
-
1
embeds_one :photo, class_name:'FHIR::Attachment'
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
1
embeds_many :coverageArea, class_name:'FHIR::Reference'
-
1
embeds_many :serviceProvisionCode, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :eligibility, class_name:'FHIR::CodeableConcept'
-
1
field :eligibilityNote, type: String
-
1
field :programName, type: Array # Array of Strings
-
1
embeds_many :characteristic, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :referralMethod, class_name:'FHIR::CodeableConcept'
-
1
field :publicKey, type: String
-
1
field :appointmentRequired, type: Boolean
-
1
embeds_many :availableTime, class_name:'FHIR::HealthcareService::HealthcareServiceAvailableTimeComponent'
-
1
embeds_many :notAvailable, class_name:'FHIR::HealthcareService::HealthcareServiceNotAvailableComponent'
-
1
field :availabilityExceptions, type: String
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class HumanName
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::HumanName
-
-
-
1
VALID_CODES = {
-
use: [ 'usual', 'official', 'temp', 'nickname', 'anonymous', 'old', 'maiden' ]
-
}
-
-
1
field :use, type: String
-
1
field :text, type: String
-
1
field :family, type: Array # Array of Strings
-
1
field :given, type: Array # Array of Strings
-
1
field :prefix, type: Array # Array of Strings
-
1
field :suffix, type: Array # Array of Strings
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Identifier
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Identifier
-
-
-
1
VALID_CODES = {
-
use: [ 'usual', 'official', 'temp', 'secondary' ],
-
fhirType: [ 'UDI', 'SNO', 'SB', 'PLAC', 'FILL', 'DL', 'PPN', 'BRN', 'MR', 'MCN', 'EN', 'TAX', 'NIIP', 'PRN', 'MD', 'DR' ]
-
}
-
-
1
field :use, type: String
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
field :system, type: String
-
1
field :value, type: String
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
embeds_one :assigner, class_name:'FHIR::Reference'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class ImagingObjectSelection
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::ImagingObjectSelection
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'authoring-time',
-
'selected-study',
-
'author',
-
'patient',
-
'title'
-
]
-
-
1
VALID_CODES = {
-
title: [ '113000', '113001', '113002', '113003', '113004', '113005', '113006', '113007', '113008', '113009', '113010', '113013', '113018', '113020', '113021', '113030', '113031', '113032', '113033', '113034', '113035', '113036', '113037', '113038', '113039' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec frames
-
1
class FramesComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :frameNumbers, type: Array # Array of Integers
-
1
validates_presence_of :frameNumbers
-
1
field :url, type: String
-
1
validates_presence_of :url
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec instance
-
1
class InstanceComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :sopClass, type: String
-
1
validates_presence_of :sopClass
-
1
field :uid, type: String
-
1
validates_presence_of :uid
-
1
field :url, type: String
-
1
validates_presence_of :url
-
1
embeds_many :frames, class_name:'FHIR::ImagingObjectSelection::FramesComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec series
-
1
class SeriesComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :uid, type: String
-
1
field :url, type: String
-
1
embeds_many :instance, class_name:'FHIR::ImagingObjectSelection::InstanceComponent'
-
1
validates_presence_of :instance
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec study
-
1
class StudyComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :uid, type: String
-
1
validates_presence_of :uid
-
1
field :url, type: String
-
1
embeds_one :imagingStudy, class_name:'FHIR::Reference'
-
1
embeds_many :series, class_name:'FHIR::ImagingObjectSelection::SeriesComponent'
-
1
validates_presence_of :series
-
end
-
-
1
field :uid, type: String
-
1
validates_presence_of :uid
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
validates_presence_of :patient
-
1
embeds_one :title, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :title
-
1
field :description, type: String
-
1
embeds_one :author, class_name:'FHIR::Reference'
-
1
field :authoringTime, type: String
-
1
validates :authoringTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_many :study, class_name:'FHIR::ImagingObjectSelection::StudyComponent'
-
1
validates_presence_of :study
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class ImagingStudy
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::ImagingStudy
-
-
1
SEARCH_PARAMS = [
-
'uid',
-
'study',
-
'dicom-class',
-
'modality',
-
'bodysite',
-
'patient',
-
'series',
-
'started',
-
'accession',
-
'order'
-
]
-
-
1
VALID_CODES = {
-
modalityList: [ 'AR', 'BMD', 'BDUS', 'EPS', 'CR', 'CT', 'DX', 'ECG', 'ES', 'XC', 'GM', 'HD', 'IO', 'IVOCT', 'IVUS', 'KER', 'LEN', 'MR', 'MG', 'NM', 'OAM', 'OCT', 'OPM', 'OP', 'OPR', 'OPT', 'OPV', 'OSS', 'PX', 'PT', 'RF', 'RG', 'SM', 'SRF', 'US', 'VA', 'XA' ],
-
availability: [ 'ONLINE', 'OFFLINE', 'NEARLINE', 'UNAVAILABLE' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec instance
-
1
class ImagingStudySeriesInstanceComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :number, type: Integer
-
1
field :uid, type: String
-
1
validates_presence_of :uid
-
1
field :sopClass, type: String
-
1
validates_presence_of :sopClass
-
1
field :fhirType, type: String
-
1
field :title, type: String
-
1
embeds_many :content, class_name:'FHIR::Attachment'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec series
-
1
class ImagingStudySeriesComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
modality: [ 'AR', 'BMD', 'BDUS', 'EPS', 'CR', 'CT', 'DX', 'ECG', 'ES', 'XC', 'GM', 'HD', 'IO', 'IVOCT', 'IVUS', 'KER', 'LEN', 'MR', 'MG', 'NM', 'OAM', 'OCT', 'OPM', 'OP', 'OPR', 'OPT', 'OPV', 'OSS', 'PX', 'PT', 'RF', 'RG', 'SM', 'SRF', 'US', 'VA', 'XA' ],
-
availability: [ 'ONLINE', 'OFFLINE', 'NEARLINE', 'UNAVAILABLE' ]
-
}
-
-
1
field :number, type: Integer
-
1
embeds_one :modality, class_name:'FHIR::Coding'
-
1
validates_presence_of :modality
-
1
field :uid, type: String
-
1
validates_presence_of :uid
-
1
field :description, type: String
-
1
field :numberOfInstances, type: Integer
-
1
validates_presence_of :numberOfInstances
-
1
field :availability, type: String
-
1
field :url, type: String
-
1
embeds_one :bodySite, class_name:'FHIR::Coding'
-
1
embeds_one :laterality, class_name:'FHIR::Coding'
-
1
field :started, type: String
-
1
validates :started, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_many :instance, class_name:'FHIR::ImagingStudy::ImagingStudySeriesInstanceComponent'
-
end
-
-
1
field :started, type: String
-
1
validates :started, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
validates_presence_of :patient
-
1
field :uid, type: String
-
1
validates_presence_of :uid
-
1
embeds_one :accession, class_name:'FHIR::Identifier'
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_many :order, class_name:'FHIR::Reference'
-
1
embeds_many :modalityList, class_name:'FHIR::Coding'
-
1
embeds_one :referrer, class_name:'FHIR::Reference'
-
1
field :availability, type: String
-
1
field :url, type: String
-
1
field :numberOfSeries, type: Integer
-
1
validates_presence_of :numberOfSeries
-
1
field :numberOfInstances, type: Integer
-
1
validates_presence_of :numberOfInstances
-
1
embeds_many :procedure, class_name:'FHIR::Reference'
-
1
embeds_one :interpreter, class_name:'FHIR::Reference'
-
1
field :description, type: String
-
1
embeds_many :series, class_name:'FHIR::ImagingStudy::ImagingStudySeriesComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Immunization
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Immunization
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'requester',
-
'identifier',
-
'reason',
-
'performer',
-
'reaction',
-
'lot-number',
-
'notgiven',
-
'manufacturer',
-
'dose-sequence',
-
'patient',
-
'vaccine-code',
-
'reason-not-given',
-
'location',
-
'reaction-date',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
site: [ 'LA', 'RA' ],
-
route: [ 'IM', 'PO', 'NASINHL' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec explanation
-
1
class ImmunizationExplanationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
reason: [ '429060002', '281657000' ],
-
reasonNotGiven: [ 'IMMUNE', 'MEDPREC', 'OSTOCK', 'PATOBJ' ]
-
}
-
-
1
embeds_many :reason, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :reasonNotGiven, class_name:'FHIR::CodeableConcept'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec reaction
-
1
class ImmunizationReactionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :detail, class_name:'FHIR::Reference'
-
1
field :reported, type: Boolean
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec vaccinationProtocol
-
1
class ImmunizationVaccinationProtocolComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
doseStatusReason: [ 'advstorage', 'coldchbrk', 'explot', 'outsidesched', 'prodrecall' ],
-
doseStatus: [ 'count', 'nocount' ],
-
targetDisease: [ '1857005', '397430003', '14189004', '36989005', '36653000', '76902006', '709410003', '27836007', '398102009' ]
-
}
-
-
1
field :doseSequence, type: Integer
-
1
validates_presence_of :doseSequence
-
1
field :description, type: String
-
1
embeds_one :authority, class_name:'FHIR::Reference'
-
1
field :series, type: String
-
1
field :seriesDoses, type: Integer
-
1
embeds_many :targetDisease, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :targetDisease
-
1
embeds_one :doseStatus, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :doseStatus
-
1
embeds_one :doseStatusReason, class_name:'FHIR::CodeableConcept'
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :vaccineCode, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :vaccineCode
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
validates_presence_of :patient
-
1
field :wasNotGiven, type: Boolean
-
1
validates_presence_of :wasNotGiven
-
1
field :reported, type: Boolean
-
1
validates_presence_of :reported
-
1
embeds_one :performer, class_name:'FHIR::Reference'
-
1
embeds_one :requester, class_name:'FHIR::Reference'
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
embeds_one :manufacturer, class_name:'FHIR::Reference'
-
1
embeds_one :location, class_name:'FHIR::Reference'
-
1
field :lotNumber, type: String
-
1
field :expirationDate, type: String
-
1
validates :expirationDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
1
embeds_one :site, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :route, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :doseQuantity, class_name:'FHIR::Quantity'
-
1
embeds_many :note, class_name:'FHIR::Annotation'
-
1
embeds_one :explanation, class_name:'FHIR::Immunization::ImmunizationExplanationComponent'
-
1
embeds_many :reaction, class_name:'FHIR::Immunization::ImmunizationReactionComponent'
-
1
embeds_many :vaccinationProtocol, class_name:'FHIR::Immunization::ImmunizationVaccinationProtocolComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class ImmunizationRecommendation
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::ImmunizationRecommendation
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'identifier',
-
'dose-sequence',
-
'patient',
-
'vaccine-type',
-
'dose-number',
-
'information',
-
'support',
-
'status'
-
]
-
# This is an ugly hack to deal with embedded structures in the spec dateCriterion
-
1
class ImmunizationRecommendationRecommendationDateCriterionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
code: [ 'due', 'recommended', 'earliest', 'overdue', 'latest' ]
-
}
-
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :code
-
1
field :value, type: String
-
1
validates :value, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
validates_presence_of :value
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec protocol
-
1
class ImmunizationRecommendationRecommendationProtocolComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :doseSequence, type: Integer
-
1
field :description, type: String
-
1
embeds_one :authority, class_name:'FHIR::Reference'
-
1
field :series, type: String
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec recommendation
-
1
class ImmunizationRecommendationRecommendationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
forecastStatus: [ 'due', 'overdue' ]
-
}
-
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
validates_presence_of :date
-
1
embeds_one :vaccineCode, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :vaccineCode
-
1
field :doseNumber, type: Integer
-
1
embeds_one :forecastStatus, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :forecastStatus
-
1
embeds_many :dateCriterion, class_name:'FHIR::ImmunizationRecommendation::ImmunizationRecommendationRecommendationDateCriterionComponent'
-
1
embeds_one :protocol, class_name:'FHIR::ImmunizationRecommendation::ImmunizationRecommendationRecommendationProtocolComponent'
-
1
embeds_many :supportingImmunization, class_name:'FHIR::Reference'
-
1
embeds_many :supportingPatientInformation, class_name:'FHIR::Reference'
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
validates_presence_of :patient
-
1
embeds_many :recommendation, class_name:'FHIR::ImmunizationRecommendation::ImmunizationRecommendationRecommendationComponent'
-
1
validates_presence_of :recommendation
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class ImplementationGuide
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::ImplementationGuide
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'dependency',
-
'name',
-
'context',
-
'publisher',
-
'description',
-
'experimental',
-
'version',
-
'url',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'draft', 'active', 'retired' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec contact
-
1
class ImplementationGuideContactComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :name, type: String
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec dependency
-
1
class ImplementationGuideDependencyComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirType: [ 'reference', 'inclusion' ]
-
}
-
-
1
field :fhirType, type: String
-
1
validates_presence_of :fhirType
-
1
field :uri, type: String
-
1
validates_presence_of :uri
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec resource
-
1
class ImplementationGuidePackageResourceComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
purpose: [ 'example', 'terminology', 'profile', 'extension', 'dictionary', 'logical' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
source: [ 'sourceUri', 'sourceReference' ]
-
}
-
-
1
field :purpose, type: String
-
1
validates_presence_of :purpose
-
1
field :name, type: String
-
1
field :description, type: String
-
1
field :acronym, type: String
-
1
field :sourceUri, type: String
-
1
validates_presence_of :sourceUri
-
1
embeds_one :sourceReference, class_name:'FHIR::Reference'
-
1
validates_presence_of :sourceReference
-
1
embeds_one :exampleFor, class_name:'FHIR::Reference'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec package
-
1
class ImplementationGuidePackageComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :name, type: String
-
1
validates_presence_of :name
-
1
field :description, type: String
-
1
embeds_many :resource, class_name:'FHIR::ImplementationGuide::ImplementationGuidePackageResourceComponent'
-
1
validates_presence_of :resource
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec global
-
1
class ImplementationGuideGlobalComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :fhirType, type: String
-
1
validates_presence_of :fhirType
-
1
embeds_one :profile, class_name:'FHIR::Reference'
-
1
validates_presence_of :profile
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec page
-
1
class ImplementationGuidePageComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
kind: [ 'page', 'example', 'list', 'include', 'directory', 'dictionary', 'toc', 'resource' ]
-
}
-
-
1
field :source, type: String
-
1
validates_presence_of :source
-
1
field :name, type: String
-
1
validates_presence_of :name
-
1
field :kind, type: String
-
1
validates_presence_of :kind
-
1
field :fhirType, type: Array # Array of Strings
-
1
field :package, type: Array # Array of Strings
-
1
field :format, type: String
-
1
embeds_many :page, class_name:'FHIR::ImplementationGuide::ImplementationGuidePageComponent'
-
end
-
-
1
field :url, type: String
-
1
validates_presence_of :url
-
1
field :versionNum, type: String
-
1
field :name, type: String
-
1
validates_presence_of :name
-
1
field :status, type: String
-
1
validates :status, :inclusion => { in: VALID_CODES[:status] }
-
1
validates_presence_of :status
-
1
field :experimental, type: Boolean
-
1
field :publisher, type: String
-
1
embeds_many :contact, class_name:'FHIR::ImplementationGuide::ImplementationGuideContactComponent'
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :description, type: String
-
1
embeds_many :useContext, class_name:'FHIR::CodeableConcept'
-
1
field :copyright, type: String
-
1
field :fhirVersion, type: String
-
1
embeds_many :dependency, class_name:'FHIR::ImplementationGuide::ImplementationGuideDependencyComponent'
-
1
embeds_many :package, class_name:'FHIR::ImplementationGuide::ImplementationGuidePackageComponent'
-
1
validates_presence_of :package
-
1
embeds_many :global, class_name:'FHIR::ImplementationGuide::ImplementationGuideGlobalComponent'
-
1
field :binary, type: Array # Array of Strings
-
1
embeds_one :page, class_name:'FHIR::ImplementationGuide::ImplementationGuidePageComponent'
-
1
validates_presence_of :page
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class List
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::List
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'item',
-
'empty-reason',
-
'code',
-
'notes',
-
'subject',
-
'patient',
-
'source',
-
'encounter',
-
'title',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
mode: [ 'working', 'snapshot', 'changes' ],
-
code: [ 'alerts', 'adverserxns', 'allergies', 'medications', 'problems', 'worklist', 'waiting', 'protocols', 'plans' ],
-
orderedBy: [ 'user', 'system', 'event-date', 'entry-date', 'priority', 'alphabetic', 'category', 'patient' ],
-
emptyReason: [ 'nilknown', 'notasked', 'withheld', 'unavailable', 'notstarted', 'closed' ],
-
status: [ 'current', 'retired', 'entered-in-error' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec entry
-
1
class ListEntryComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
flag: [ '01', '02', '03', '04', '05', '06' ]
-
}
-
-
1
embeds_one :flag, class_name:'FHIR::CodeableConcept'
-
1
field :fhirDeleted, type: Boolean
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :item, class_name:'FHIR::Reference'
-
1
validates_presence_of :item
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :title, type: String
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
embeds_one :source, class_name:'FHIR::Reference'
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :orderedBy, class_name:'FHIR::CodeableConcept'
-
1
field :mode, type: String
-
1
validates_presence_of :mode
-
1
field :note, type: String
-
1
embeds_many :entry, class_name:'FHIR::List::ListEntryComponent'
-
1
embeds_one :emptyReason, class_name:'FHIR::CodeableConcept'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Location
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Location
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'partof',
-
'near-distance',
-
'address',
-
'address-state',
-
'type',
-
'address-postalcode',
-
'address-country',
-
'organization',
-
'name',
-
'address-use',
-
'near',
-
'address-city',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
mode: [ 'instance', 'kind' ],
-
physicalType: [ 'bu', 'wi', 'lvl', 'co', 'ro', 'bd', 've', 'ho', 'ca', 'rd', 'jdn', 'area' ],
-
status: [ 'active', 'suspended', 'inactive' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec position
-
1
class LocationPositionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :longitude, type: Float
-
1
validates_presence_of :longitude
-
1
field :latitude, type: Float
-
1
validates_presence_of :latitude
-
1
field :altitude, type: Float
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :status, type: String
-
1
field :name, type: String
-
1
field :description, type: String
-
1
field :mode, type: String
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
1
embeds_one :address, class_name:'FHIR::Address'
-
1
embeds_one :physicalType, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :position, class_name:'FHIR::Location::LocationPositionComponent'
-
1
embeds_one :managingOrganization, class_name:'FHIR::Reference'
-
1
embeds_one :partOf, class_name:'FHIR::Reference'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Media
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Media
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'view',
-
'subtype',
-
'created',
-
'subject',
-
'patient',
-
'type',
-
'operator'
-
]
-
-
1
VALID_CODES = {
-
subtype: [ 'diagram', 'fax', 'scan', 'retina', 'fingerprint', 'iris', 'palm', 'face' ],
-
fhirType: [ 'photo', 'video', 'audio' ]
-
}
-
-
1
field :fhirType, type: String
-
1
validates_presence_of :fhirType
-
1
embeds_one :subtype, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
embeds_one :operator, class_name:'FHIR::Reference'
-
1
embeds_one :view, class_name:'FHIR::CodeableConcept'
-
1
field :deviceName, type: String
-
1
field :height, type: Integer
-
1
field :width, type: Integer
-
1
field :frames, type: Integer
-
1
field :duration, type: Integer
-
1
embeds_one :content, class_name:'FHIR::Attachment'
-
1
validates_presence_of :content
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Medication
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Medication
-
-
1
SEARCH_PARAMS = [
-
'container',
-
'code',
-
'ingredient',
-
'form',
-
'content',
-
'manufacturer'
-
]
-
# This is an ugly hack to deal with embedded structures in the spec ingredient
-
1
class MedicationProductIngredientComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :item, class_name:'FHIR::Reference'
-
1
validates_presence_of :item
-
1
embeds_one :amount, class_name:'FHIR::Ratio'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec batch
-
1
class MedicationProductBatchComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :lotNumber, type: String
-
1
field :expirationDate, type: String
-
1
validates :expirationDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec product
-
1
class MedicationProductComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :form, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :ingredient, class_name:'FHIR::Medication::MedicationProductIngredientComponent'
-
1
embeds_many :batch, class_name:'FHIR::Medication::MedicationProductBatchComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec content
-
1
class MedicationPackageContentComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :item, class_name:'FHIR::Reference'
-
1
validates_presence_of :item
-
1
embeds_one :amount, class_name:'FHIR::Quantity'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec package
-
1
class MedicationPackageComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :container, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :content, class_name:'FHIR::Medication::MedicationPackageContentComponent'
-
end
-
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
field :isBrand, type: Boolean
-
1
embeds_one :manufacturer, class_name:'FHIR::Reference'
-
1
embeds_one :product, class_name:'FHIR::Medication::MedicationProductComponent'
-
1
embeds_one :package, class_name:'FHIR::Medication::MedicationPackageComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class MedicationAdministration
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::MedicationAdministration
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'code',
-
'prescription',
-
'effectivetime',
-
'practitioner',
-
'patient',
-
'medication',
-
'encounter',
-
'device',
-
'notgiven',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
reasonGiven: [ 'a', 'b', 'c' ],
-
reasonNotGiven: [ 'a', 'b', 'c', 'd' ],
-
status: [ 'in-progress', 'on-hold', 'completed', 'entered-in-error', 'stopped' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
effectiveTime: [ 'effectiveTimeDateTime', 'effectiveTimePeriod' ],
-
medication: [ 'medicationCodeableConcept', 'medicationReference' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec dosage
-
1
class MedicationAdministrationDosageComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
site: [ 'siteCodeableConcept', 'siteReference' ],
-
rate: [ 'rateRatio', 'rateRange' ]
-
}
-
-
1
field :text, type: String
-
1
embeds_one :siteCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :siteReference, class_name:'FHIR::Reference'
-
1
embeds_one :route, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :method, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :quantity, class_name:'FHIR::Quantity'
-
1
embeds_one :rateRatio, class_name:'FHIR::Ratio'
-
1
embeds_one :rateRange, class_name:'FHIR::Range'
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
validates_presence_of :patient
-
1
embeds_one :practitioner, class_name:'FHIR::Reference'
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
embeds_one :prescription, class_name:'FHIR::Reference'
-
1
field :wasNotGiven, type: Boolean
-
1
embeds_many :reasonNotGiven, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :reasonGiven, class_name:'FHIR::CodeableConcept'
-
1
field :effectiveTimeDateTime, type: String
-
1
validates :effectiveTimeDateTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
validates_presence_of :effectiveTimeDateTime
-
1
embeds_one :effectiveTimePeriod, class_name:'FHIR::Period'
-
1
validates_presence_of :effectiveTimePeriod
-
1
embeds_one :medicationCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :medicationCodeableConcept
-
1
embeds_one :medicationReference, class_name:'FHIR::Reference'
-
1
validates_presence_of :medicationReference
-
1
embeds_many :device, class_name:'FHIR::Reference'
-
1
field :note, type: String
-
1
embeds_one :dosage, class_name:'FHIR::MedicationAdministration::MedicationAdministrationDosageComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class MedicationDispense
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::MedicationDispense
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'code',
-
'receiver',
-
'destination',
-
'medication',
-
'responsibleparty',
-
'type',
-
'whenhandedover',
-
'whenprepared',
-
'dispenser',
-
'prescription',
-
'patient',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'in-progress', 'on-hold', 'completed', 'entered-in-error', 'stopped' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
medication: [ 'medicationCodeableConcept', 'medicationReference' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec dosageInstruction
-
1
class MedicationDispenseDosageInstructionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
asNeeded: [ 'asNeededBoolean', 'asNeededCodeableConcept' ],
-
site: [ 'siteCodeableConcept', 'siteReference' ],
-
dose: [ 'doseRange', 'doseQuantity' ],
-
rate: [ 'rateRatio', 'rateRange' ]
-
}
-
-
1
field :text, type: String
-
1
embeds_one :additionalInstructions, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :timing, class_name:'FHIR::Timing'
-
1
field :asNeededBoolean, type: Boolean
-
1
embeds_one :asNeededCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :siteCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :siteReference, class_name:'FHIR::Reference'
-
1
embeds_one :route, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :method, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :doseRange, class_name:'FHIR::Range'
-
1
embeds_one :doseQuantity, class_name:'FHIR::Quantity'
-
1
embeds_one :rateRatio, class_name:'FHIR::Ratio'
-
1
embeds_one :rateRange, class_name:'FHIR::Range'
-
1
embeds_one :maxDosePerPeriod, class_name:'FHIR::Ratio'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec substitution
-
1
class MedicationDispenseSubstitutionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :fhirType
-
1
embeds_many :reason, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :responsibleParty, class_name:'FHIR::Reference'
-
end
-
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
field :status, type: String
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
embeds_one :dispenser, class_name:'FHIR::Reference'
-
1
embeds_many :authorizingPrescription, class_name:'FHIR::Reference'
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :quantity, class_name:'FHIR::Quantity'
-
1
embeds_one :daysSupply, class_name:'FHIR::Quantity'
-
1
embeds_one :medicationCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :medicationCodeableConcept
-
1
embeds_one :medicationReference, class_name:'FHIR::Reference'
-
1
validates_presence_of :medicationReference
-
1
field :whenPrepared, type: String
-
1
validates :whenPrepared, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :whenHandedOver, type: String
-
1
validates :whenHandedOver, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :destination, class_name:'FHIR::Reference'
-
1
embeds_many :receiver, class_name:'FHIR::Reference'
-
1
field :note, type: String
-
1
embeds_many :dosageInstruction, class_name:'FHIR::MedicationDispense::MedicationDispenseDosageInstructionComponent'
-
1
embeds_one :substitution, class_name:'FHIR::MedicationDispense::MedicationDispenseSubstitutionComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class MedicationOrder
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::MedicationOrder
-
-
1
SEARCH_PARAMS = [
-
'prescriber',
-
'identifier',
-
'code',
-
'patient',
-
'datewritten',
-
'medication',
-
'encounter',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'active', 'on-hold', 'completed', 'entered-in-error', 'stopped', 'draft' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
reason: [ 'reasonCodeableConcept', 'reasonReference' ],
-
medication: [ 'medicationCodeableConcept', 'medicationReference' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec dosageInstruction
-
1
class MedicationOrderDosageInstructionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
asNeeded: [ 'asNeededBoolean', 'asNeededCodeableConcept' ],
-
site: [ 'siteCodeableConcept', 'siteReference' ],
-
dose: [ 'doseRange', 'doseQuantity' ],
-
rate: [ 'rateRatio', 'rateRange' ]
-
}
-
-
1
field :text, type: String
-
1
embeds_one :additionalInstructions, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :timing, class_name:'FHIR::Timing'
-
1
field :asNeededBoolean, type: Boolean
-
1
embeds_one :asNeededCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :siteCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :siteReference, class_name:'FHIR::Reference'
-
1
embeds_one :route, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :method, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :doseRange, class_name:'FHIR::Range'
-
1
embeds_one :doseQuantity, class_name:'FHIR::Quantity'
-
1
embeds_one :rateRatio, class_name:'FHIR::Ratio'
-
1
embeds_one :rateRange, class_name:'FHIR::Range'
-
1
embeds_one :maxDosePerPeriod, class_name:'FHIR::Ratio'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec dispenseRequest
-
1
class MedicationOrderDispenseRequestComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
medication: [ 'medicationCodeableConcept', 'medicationReference' ]
-
}
-
-
1
embeds_one :medicationCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :medicationReference, class_name:'FHIR::Reference'
-
1
embeds_one :validityPeriod, class_name:'FHIR::Period'
-
1
field :numberOfRepeatsAllowed, type: Integer
-
1
embeds_one :quantity, class_name:'FHIR::Quantity'
-
1
embeds_one :expectedSupplyDuration, class_name:'FHIR::Quantity'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec substitution
-
1
class MedicationOrderSubstitutionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :fhirType
-
1
embeds_one :reason, class_name:'FHIR::CodeableConcept'
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :dateWritten, type: String
-
1
validates :dateWritten, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :status, type: String
-
1
field :dateEnded, type: String
-
1
validates :dateEnded, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :reasonEnded, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
embeds_one :prescriber, class_name:'FHIR::Reference'
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
embeds_one :reasonCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :reasonReference, class_name:'FHIR::Reference'
-
1
field :note, type: String
-
1
embeds_one :medicationCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :medicationCodeableConcept
-
1
embeds_one :medicationReference, class_name:'FHIR::Reference'
-
1
validates_presence_of :medicationReference
-
1
embeds_many :dosageInstruction, class_name:'FHIR::MedicationOrder::MedicationOrderDosageInstructionComponent'
-
1
embeds_one :dispenseRequest, class_name:'FHIR::MedicationOrder::MedicationOrderDispenseRequestComponent'
-
1
embeds_one :substitution, class_name:'FHIR::MedicationOrder::MedicationOrderSubstitutionComponent'
-
1
embeds_one :priorPrescription, class_name:'FHIR::Reference'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class MedicationStatement
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::MedicationStatement
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'code',
-
'patient',
-
'medication',
-
'source',
-
'effectivedate',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'active', 'completed', 'entered-in-error', 'intended' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
effective: [ 'effectiveDateTime', 'effectivePeriod' ],
-
medication: [ 'medicationCodeableConcept', 'medicationReference' ],
-
reasonForUse: [ 'reasonForUseCodeableConcept', 'reasonForUseReference' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec dosage
-
1
class MedicationStatementDosageComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
asNeeded: [ 'asNeededBoolean', 'asNeededCodeableConcept' ],
-
site: [ 'siteCodeableConcept', 'siteReference' ],
-
quantity: [ 'quantityQuantity', 'quantityRange' ],
-
rate: [ 'rateRatio', 'rateRange' ]
-
}
-
-
1
field :text, type: String
-
1
embeds_one :timing, class_name:'FHIR::Timing'
-
1
field :asNeededBoolean, type: Boolean
-
1
embeds_one :asNeededCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :siteCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :siteReference, class_name:'FHIR::Reference'
-
1
embeds_one :route, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :method, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :quantityQuantity, class_name:'FHIR::Quantity'
-
1
embeds_one :quantityRange, class_name:'FHIR::Range'
-
1
embeds_one :rateRatio, class_name:'FHIR::Ratio'
-
1
embeds_one :rateRange, class_name:'FHIR::Range'
-
1
embeds_one :maxDosePerPeriod, class_name:'FHIR::Ratio'
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
validates_presence_of :patient
-
1
embeds_one :informationSource, class_name:'FHIR::Reference'
-
1
field :dateAsserted, type: String
-
1
validates :dateAsserted, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
field :wasNotTaken, type: Boolean
-
1
embeds_many :reasonNotTaken, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :reasonForUseCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :reasonForUseReference, class_name:'FHIR::Reference'
-
1
field :effectiveDateTime, type: String
-
1
validates :effectiveDateTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :effectivePeriod, class_name:'FHIR::Period'
-
1
field :note, type: String
-
1
embeds_many :supportingInformation, class_name:'FHIR::Reference'
-
1
embeds_one :medicationCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :medicationCodeableConcept
-
1
embeds_one :medicationReference, class_name:'FHIR::Reference'
-
1
validates_presence_of :medicationReference
-
1
embeds_many :dosage, class_name:'FHIR::MedicationStatement::MedicationStatementDosageComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class MessageHeader
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::MessageHeader
-
-
1
SEARCH_PARAMS = [
-
'code',
-
'data',
-
'receiver',
-
'author',
-
'destination',
-
'source',
-
'target',
-
'destination-uri',
-
'source-uri',
-
'responsible',
-
'response-id',
-
'enterer',
-
'event',
-
'timestamp'
-
]
-
-
1
VALID_CODES = {
-
reason: [ 'admit', 'discharge', 'absent', 'return', 'moved', 'edit' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec response
-
1
class MessageHeaderResponseComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
code: [ 'ok', 'transient-error', 'fatal-error' ]
-
}
-
-
1
field :identifier, type: String
-
1
validates_presence_of :identifier
-
1
field :code, type: String
-
1
validates_presence_of :code
-
1
embeds_one :details, class_name:'FHIR::Reference'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec source
-
1
class MessageSourceComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :name, type: String
-
1
field :software, type: String
-
1
field :versionNum, type: String
-
1
embeds_one :contact, class_name:'FHIR::ContactPoint'
-
1
field :endpoint, type: String
-
1
validates_presence_of :endpoint
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec destination
-
1
class MessageDestinationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :name, type: String
-
1
embeds_one :target, class_name:'FHIR::Reference'
-
1
field :endpoint, type: String
-
1
validates_presence_of :endpoint
-
end
-
-
1
field :timestamp, type: String
-
1
validates :timestamp, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
1
validates_presence_of :timestamp
-
1
embeds_one :event, class_name:'FHIR::Coding'
-
1
validates_presence_of :event
-
1
embeds_one :response, class_name:'FHIR::MessageHeader::MessageHeaderResponseComponent'
-
1
embeds_one :source, class_name:'FHIR::MessageHeader::MessageSourceComponent'
-
1
validates_presence_of :source
-
1
embeds_many :destination, class_name:'FHIR::MessageHeader::MessageDestinationComponent'
-
1
embeds_one :enterer, class_name:'FHIR::Reference'
-
1
embeds_one :author, class_name:'FHIR::Reference'
-
1
embeds_one :receiver, class_name:'FHIR::Reference'
-
1
embeds_one :responsible, class_name:'FHIR::Reference'
-
1
embeds_one :reason, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :data, class_name:'FHIR::Reference'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Meta
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Meta
-
-
1
field :versionId, type: String
-
1
field :lastUpdated, type: String
-
1
validates :lastUpdated, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
1
field :profile, type: Array # Array of Strings
-
1
embeds_many :security, class_name:'FHIR::Coding'
-
1
embeds_many :tag, class_name:'FHIR::Coding'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class NamingSystem
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::NamingSystem
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'period',
-
'kind',
-
'type',
-
'id-type',
-
'responsible',
-
'contact',
-
'name',
-
'context',
-
'publisher',
-
'telecom',
-
'value',
-
'replaced-by',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
kind: [ 'codesystem', 'identifier', 'root' ],
-
fhirType: [ 'UDI', 'SNO', 'SB', 'PLAC', 'FILL', 'DL', 'PPN', 'BRN', 'MR', 'MCN', 'EN', 'TAX', 'NIIP', 'PRN', 'MD', 'DR' ],
-
status: [ 'draft', 'active', 'retired' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec contact
-
1
class NamingSystemContactComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :name, type: String
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec uniqueId
-
1
class NamingSystemUniqueIdComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirType: [ 'oid', 'uuid', 'uri', 'other' ]
-
}
-
-
1
field :fhirType, type: String
-
1
validates_presence_of :fhirType
-
1
field :value, type: String
-
1
validates_presence_of :value
-
1
field :preferred, type: Boolean
-
1
embeds_one :period, class_name:'FHIR::Period'
-
end
-
-
1
field :name, type: String
-
1
validates_presence_of :name
-
1
field :status, type: String
-
1
validates :status, :inclusion => { in: VALID_CODES[:status] }
-
1
validates_presence_of :status
-
1
field :kind, type: String
-
1
validates_presence_of :kind
-
1
field :publisher, type: String
-
1
embeds_many :contact, class_name:'FHIR::NamingSystem::NamingSystemContactComponent'
-
1
field :responsible, type: String
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
validates_presence_of :date
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
field :description, type: String
-
1
embeds_many :useContext, class_name:'FHIR::CodeableConcept'
-
1
field :usage, type: String
-
1
embeds_many :uniqueId, class_name:'FHIR::NamingSystem::NamingSystemUniqueIdComponent'
-
1
validates_presence_of :uniqueId
-
1
embeds_one :replacedBy, class_name:'FHIR::Reference'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Narrative
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Narrative
-
-
-
1
VALID_CODES = {
-
status: [ 'generated', 'extensions', 'additional', 'empty' ]
-
}
-
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
field :div, type: String
-
1
validates_presence_of :div
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class NutritionOrder
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::NutritionOrder
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'datetime',
-
'provider',
-
'patient',
-
'supplement',
-
'formula',
-
'encounter',
-
'oraldiet',
-
'status',
-
'additive'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'proposed', 'draft', 'planned', 'requested', 'active', 'on-hold', 'completed', 'cancelled' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec nutrient
-
1
class NutritionOrderOralDietNutrientComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirModifier: [ '33463005', '39972003', '88480006' ]
-
}
-
-
1
embeds_one :fhirModifier, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :amount, class_name:'FHIR::Quantity'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec texture
-
1
class NutritionOrderOralDietTextureComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirModifier: [ '228053002', '439091000124107', '228049004', '441881000124103', '441761000124103', '441751000124100', '228059003', '441791000124106', '228055009', '228056005', '441771000124105', '228057001', '228058006', '228060008' ],
-
foodType: [ '255620007', '28647000', '22836000', '72511004', '226760005', '226887002', '102263004', '74242007', '227415002', '264331002', '227518002', '44027008', '226529007', '227210005' ]
-
}
-
-
1
embeds_one :fhirModifier, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :foodType, class_name:'FHIR::CodeableConcept'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec oralDiet
-
1
class NutritionOrderOralDietComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fluidConsistencyType: [ '439031000124108', '439021000124105', '439041000124103', '439081000124109' ]
-
}
-
-
1
embeds_many :fhirType, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :schedule, class_name:'FHIR::Timing'
-
1
embeds_many :nutrient, class_name:'FHIR::NutritionOrder::NutritionOrderOralDietNutrientComponent'
-
1
embeds_many :texture, class_name:'FHIR::NutritionOrder::NutritionOrderOralDietTextureComponent'
-
1
embeds_many :fluidConsistencyType, class_name:'FHIR::CodeableConcept'
-
1
field :instruction, type: String
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec supplement
-
1
class NutritionOrderSupplementComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirType: [ '442901000124106', '443031000124106', '443051000124104', '442911000124109', '443021000124108', '442971000124100', '442981000124102', '442991000124104', '443011000124100', '442961000124107', '442951000124105', '442941000124108', '442921000124101', '442931000124103', '444331000124106', '443361000124100', '443391000124108', '443401000124105', '443491000124103', '443501000124106', '443421000124100', '443471000124104', '444431000124104', '443451000124109', '444321000124108', '441561000124106', '443461000124106', '441531000124102', '443561000124107', '443481000124101', '441571000124104', '441591000124103', '441601000124106', '443351000124102', '443771000124106', '441671000124100', '443111000124101', '443431000124102', '443411000124108', '444361000124102', '444401000124107', '444381000124107', '444371000124109', '443441000124107', '442651000124102' ]
-
}
-
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
field :productName, type: String
-
1
embeds_many :schedule, class_name:'FHIR::Timing'
-
1
embeds_one :quantity, class_name:'FHIR::Quantity'
-
1
field :instruction, type: String
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec administration
-
1
class NutritionOrderEnteralFormulaAdministrationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
rate: [ 'rateQuantity', 'rateRatio' ]
-
}
-
-
1
embeds_one :schedule, class_name:'FHIR::Timing'
-
1
embeds_one :quantity, class_name:'FHIR::Quantity'
-
1
embeds_one :rateQuantity, class_name:'FHIR::Quantity'
-
1
embeds_one :rateRatio, class_name:'FHIR::Ratio'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec enteralFormula
-
1
class NutritionOrderEnteralFormulaComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
additiveType: [ 'lipid', 'protein', 'carbohydrate', 'fiber', 'water' ],
-
baseFormulaType: [ '443031000124106', '443051000124104', '442911000124109', '443021000124108', '442971000124100', '442981000124102', '442991000124104', '443011000124100', '442961000124107', '442951000124105', '442941000124108', '442921000124101', '442931000124103', '443361000124100', '443401000124105', '443491000124103', '443501000124106', '443421000124100', '443471000124104', '444431000124104', '443451000124109', '441561000124106', '443461000124106', '441531000124102', '443561000124107', '443481000124101', '441571000124104', '441591000124103', '441601000124106', '443351000124102', '443771000124106', '441671000124100', '443111000124101', '443431000124102', '443411000124108', '442651000124102' ],
-
routeofAdministration: [ 'PO', 'EFT', 'ENTINSTL', 'GT', 'NGT', 'OGT', 'GJT', 'JJTINSTL', 'OJJ' ]
-
}
-
-
1
embeds_one :baseFormulaType, class_name:'FHIR::CodeableConcept'
-
1
field :baseFormulaProductName, type: String
-
1
embeds_one :additiveType, class_name:'FHIR::CodeableConcept'
-
1
field :additiveProductName, type: String
-
1
embeds_one :caloricDensity, class_name:'FHIR::Quantity'
-
1
embeds_one :routeofAdministration, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :administration, class_name:'FHIR::NutritionOrder::NutritionOrderEnteralFormulaAdministrationComponent'
-
1
embeds_one :maxVolumeToDeliver, class_name:'FHIR::Quantity'
-
1
field :administrationInstruction, type: String
-
end
-
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
validates_presence_of :patient
-
1
embeds_one :orderer, class_name:'FHIR::Reference'
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
field :dateTime, type: String
-
1
validates :dateTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
validates_presence_of :dateTime
-
1
field :status, type: String
-
1
embeds_many :allergyIntolerance, class_name:'FHIR::Reference'
-
1
embeds_many :foodPreferenceModifier, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :excludeFoodModifier, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :oralDiet, class_name:'FHIR::NutritionOrder::NutritionOrderOralDietComponent'
-
1
embeds_many :supplement, class_name:'FHIR::NutritionOrder::NutritionOrderSupplementComponent'
-
1
embeds_one :enteralFormula, class_name:'FHIR::NutritionOrder::NutritionOrderEnteralFormulaComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Observation
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Observation
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'code',
-
'subject',
-
'component-data-absent-reason',
-
'value-concept',
-
'value-date',
-
'related',
-
'patient',
-
'specimen',
-
'component-code',
-
'value-string',
-
'identifier',
-
'component-code-value-[x]',
-
'code-value-[x]',
-
'performer',
-
'value-quantity',
-
'component-value-quantity',
-
'data-absent-reason',
-
'encounter',
-
'related-type',
-
'related-target',
-
'component-value-string',
-
'component-value-concept',
-
'category',
-
'device',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
category: [ 'social-history', 'vital-signs', 'imaging', 'laboratory', 'procedure', 'survey', 'exam', 'therapy' ],
-
status: [ 'registered', 'preliminary', 'final', 'amended', 'cancelled', 'entered-in-error', 'unknown' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
effective: [ 'effectiveDateTime', 'effectivePeriod' ],
-
value: [ 'valueQuantity', 'valueCodeableConcept', 'valueString', 'valueRange', 'valueRatio', 'valueSampledData', 'valueAttachment', 'valueTime', 'valueDateTime', 'valuePeriod' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec referenceRange
-
1
class ObservationReferenceRangeComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
meaning: [ 'type', 'normal', 'recommended', 'treatment', 'therapeutic', 'pre', 'post', 'endocrine', 'pre-puberty', 'follicular', 'midcycle', 'luteal', 'postmeopausal', '248153007', '248152002', '77386006' ]
-
}
-
-
1
embeds_one :low, class_name:'FHIR::Quantity'
-
1
embeds_one :high, class_name:'FHIR::Quantity'
-
1
embeds_one :meaning, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :age, class_name:'FHIR::Range'
-
1
field :text, type: String
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec related
-
1
class ObservationRelatedComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirType: [ 'has-member', 'derived-from', 'sequel-to', 'replaces', 'qualified-by', 'interfered-by' ]
-
}
-
-
1
field :fhirType, type: String
-
1
embeds_one :target, class_name:'FHIR::Reference'
-
1
validates_presence_of :target
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec component
-
1
class ObservationComponentComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
value: [ 'valueQuantity', 'valueCodeableConcept', 'valueString', 'valueRange', 'valueRatio', 'valueSampledData', 'valueAttachment', 'valueTime', 'valueDateTime', 'valuePeriod' ]
-
}
-
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :code
-
1
embeds_one :valueQuantity, class_name:'FHIR::Quantity'
-
1
embeds_one :valueCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
field :valueString, type: String
-
1
embeds_one :valueRange, class_name:'FHIR::Range'
-
1
embeds_one :valueRatio, class_name:'FHIR::Ratio'
-
1
embeds_one :valueSampledData, class_name:'FHIR::SampledData'
-
1
embeds_one :valueAttachment, class_name:'FHIR::Attachment'
-
1
field :valueTime, type: String
-
1
validates :valueTime, :allow_nil => true, :format => { with: /\A([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?\Z/ }
-
1
field :valueDateTime, type: String
-
1
validates :valueDateTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :valuePeriod, class_name:'FHIR::Period'
-
1
embeds_one :dataAbsentReason, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :referenceRange, class_name:'FHIR::Observation::ObservationReferenceRangeComponent'
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
embeds_one :category, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :code
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
field :effectiveDateTime, type: String
-
1
validates :effectiveDateTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :effectivePeriod, class_name:'FHIR::Period'
-
1
field :issued, type: String
-
1
validates :issued, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
1
embeds_many :performer, class_name:'FHIR::Reference'
-
1
embeds_one :valueQuantity, class_name:'FHIR::Quantity'
-
1
embeds_one :valueCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
field :valueString, type: String
-
1
embeds_one :valueRange, class_name:'FHIR::Range'
-
1
embeds_one :valueRatio, class_name:'FHIR::Ratio'
-
1
embeds_one :valueSampledData, class_name:'FHIR::SampledData'
-
1
embeds_one :valueAttachment, class_name:'FHIR::Attachment'
-
1
field :valueTime, type: String
-
1
validates :valueTime, :allow_nil => true, :format => { with: /\A([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?\Z/ }
-
1
field :valueDateTime, type: String
-
1
validates :valueDateTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :valuePeriod, class_name:'FHIR::Period'
-
1
embeds_one :dataAbsentReason, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :interpretation, class_name:'FHIR::CodeableConcept'
-
1
field :comments, type: String
-
1
embeds_one :bodySite, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :method, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :specimen, class_name:'FHIR::Reference'
-
1
embeds_one :device, class_name:'FHIR::Reference'
-
1
embeds_many :referenceRange, class_name:'FHIR::Observation::ObservationReferenceRangeComponent'
-
1
embeds_many :related, class_name:'FHIR::Observation::ObservationRelatedComponent'
-
1
embeds_many :component, class_name:'FHIR::Observation::ObservationComponentComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class OperationDefinition
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::OperationDefinition
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'code',
-
'instance',
-
'kind',
-
'profile',
-
'type',
-
'version',
-
'url',
-
'system',
-
'name',
-
'publisher',
-
'status',
-
'base'
-
]
-
-
1
VALID_CODES = {
-
kind: [ 'operation', 'query' ],
-
status: [ 'draft', 'active', 'retired' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec contact
-
1
class OperationDefinitionContactComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :name, type: String
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec binding
-
1
class OperationDefinitionParameterBindingComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
strength: [ 'required', 'extensible', 'preferred', 'example' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
valueSet: [ 'valueSetUri', 'valueSetReference' ]
-
}
-
-
1
field :strength, type: String
-
1
validates :strength, :inclusion => { in: VALID_CODES[:strength] }
-
1
validates_presence_of :strength
-
1
field :valueSetUri, type: String
-
1
validates_presence_of :valueSetUri
-
1
embeds_one :valueSetReference, class_name:'FHIR::Reference'
-
1
validates_presence_of :valueSetReference
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec parameter
-
1
class OperationDefinitionParameterComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
use: [ 'in', 'out' ]
-
}
-
-
1
field :name, type: String
-
1
validates_presence_of :name
-
1
field :use, type: String
-
1
validates_presence_of :use
-
1
field :min, type: Integer
-
1
validates_presence_of :min
-
1
field :max, type: String
-
1
validates_presence_of :max
-
1
field :documentation, type: String
-
1
field :fhirType, type: String
-
1
embeds_one :profile, class_name:'FHIR::Reference'
-
1
embeds_one :binding, class_name:'FHIR::OperationDefinition::OperationDefinitionParameterBindingComponent'
-
1
embeds_many :part, class_name:'FHIR::OperationDefinition::OperationDefinitionParameterComponent'
-
end
-
-
1
field :url, type: String
-
1
field :versionNum, type: String
-
1
field :name, type: String
-
1
validates_presence_of :name
-
1
field :status, type: String
-
1
validates :status, :inclusion => { in: VALID_CODES[:status] }
-
1
validates_presence_of :status
-
1
field :kind, type: String
-
1
validates_presence_of :kind
-
1
field :experimental, type: Boolean
-
1
field :publisher, type: String
-
1
embeds_many :contact, class_name:'FHIR::OperationDefinition::OperationDefinitionContactComponent'
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :description, type: String
-
1
field :requirements, type: String
-
1
field :idempotent, type: Boolean
-
1
field :code, type: String
-
1
validates_presence_of :code
-
1
field :notes, type: String
-
1
embeds_one :base, class_name:'FHIR::Reference'
-
1
field :system, type: Boolean
-
1
validates_presence_of :system
-
1
field :fhirType, type: Array # Array of Strings
-
1
field :instance, type: Boolean
-
1
validates_presence_of :instance
-
1
embeds_many :parameter, class_name:'FHIR::OperationDefinition::OperationDefinitionParameterComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class OperationOutcome
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::OperationOutcome
-
-
1
SEARCH_PARAMS = [
-
]
-
# This is an ugly hack to deal with embedded structures in the spec issue
-
1
class OperationOutcomeIssueComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
severity: [ 'fatal', 'error', 'warning', 'information' ],
-
code: [ 'invalid', 'structure', 'required', 'value', 'invariant', 'security', 'login', 'unknown', 'expired', 'forbidden', 'suppressed', 'processing', 'not-supported', 'duplicate', 'not-found', 'too-long', 'code-invalid', 'extension', 'too-costly', 'business-rule', 'conflict', 'incomplete', 'transient', 'lock-error', 'no-store', 'exception', 'timeout', 'throttled', 'informational' ],
-
details: [ 'MSG_AUTH_REQUIRED', 'MSG_BAD_FORMAT', 'MSG_BAD_SYNTAX', 'MSG_CANT_PARSE_CONTENT', 'MSG_CANT_PARSE_ROOT', 'MSG_CREATED', 'MSG_DATE_FORMAT', 'MSG_DELETED', 'MSG_DELETED_DONE', 'MSG_DELETED_ID', 'MSG_DUPLICATE_ID', 'MSG_ERROR_PARSING', 'MSG_ID_INVALID', 'MSG_ID_TOO_LONG', 'MSG_INVALID_ID', 'MSG_JSON_OBJECT', 'MSG_LOCAL_FAIL', 'MSG_NO_MATCH', 'MSG_NO_EXIST', 'MSG_NO_MODULE', 'MSG_NO_SUMMARY', 'MSG_OP_NOT_ALLOWED', 'MSG_PARAM_CHAINED', 'MSG_PARAM_NO_REPEAT', 'MSG_PARAM_UNKNOWN', 'MSG_RESOURCE_EXAMPLE_PROTECTED', 'MSG_RESOURCE_ID_FAIL', 'MSG_RESOURCE_NOT_ALLOWED', 'MSG_RESOURCE_REQUIRED', 'MSG_RESOURCE_ID_MISMATCH', 'MSG_RESOURCE_ID_MISSING', 'MSG_RESOURCE_TYPE_MISMATCH', 'MSG_SORT_UNKNOWN', 'MSG_TRANSACTION_DUPLICATE_ID', 'MSG_TRANSACTION_MISSING_ID', 'MSG_UNHANDLED_NODE_TYPE', 'MSG_UNKNOWN_CONTENT', 'MSG_UNKNOWN_OPERATION', 'MSG_UNKNOWN_TYPE', 'MSG_UPDATED', 'MSG_VERSION_AWARE', 'MSG_VERSION_AWARE_CONFLICT', 'MSG_VERSION_AWARE_URL', 'MSG_WRONG_NS', 'SEARCH_MULTIPLE', 'UPDATE_MULTIPLE_MATCHES', 'SEARCH_NONE' ]
-
}
-
-
1
field :severity, type: String
-
1
validates_presence_of :severity
-
1
field :code, type: String
-
1
validates_presence_of :code
-
1
embeds_one :details, class_name:'FHIR::CodeableConcept'
-
1
field :diagnostics, type: String
-
1
field :location, type: Array # Array of Strings
-
end
-
-
1
embeds_many :issue, class_name:'FHIR::OperationOutcome::OperationOutcomeIssueComponent'
-
1
validates_presence_of :issue
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Order
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Order
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'identifier',
-
'subject',
-
'patient',
-
'source',
-
'detail',
-
'when',
-
'target',
-
'when_code'
-
]
-
1
MULTIPLE_TYPES = {
-
reason: [ 'reasonCodeableConcept', 'reasonReference' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec when
-
1
class OrderWhenComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :schedule, class_name:'FHIR::Timing'
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
embeds_one :source, class_name:'FHIR::Reference'
-
1
embeds_one :target, class_name:'FHIR::Reference'
-
1
embeds_one :reasonCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :reasonReference, class_name:'FHIR::Reference'
-
1
embeds_one :when, class_name:'FHIR::Order::OrderWhenComponent'
-
1
embeds_many :detail, class_name:'FHIR::Reference'
-
1
validates_presence_of :detail
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class OrderResponse
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::OrderResponse
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'request',
-
'identifier',
-
'code',
-
'fulfillment',
-
'who'
-
]
-
-
1
VALID_CODES = {
-
orderStatus: [ 'pending', 'review', 'rejected', 'error', 'accepted', 'cancelled', 'replaced', 'aborted', 'completed' ]
-
}
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :request, class_name:'FHIR::Reference'
-
1
validates_presence_of :request
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :who, class_name:'FHIR::Reference'
-
1
field :orderStatus, type: String
-
1
validates_presence_of :orderStatus
-
1
field :description, type: String
-
1
embeds_many :fulfillment, class_name:'FHIR::Reference'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Organization
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Organization
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'partof',
-
'phonetic',
-
'address',
-
'address-state',
-
'name',
-
'address-use',
-
'active',
-
'type',
-
'address-city',
-
'address-postalcode',
-
'address-country'
-
]
-
-
1
VALID_CODES = {
-
fhirType: [ 'prov', 'dept', 'team', 'govt', 'ins', 'edu', 'reli', 'crs', 'cg', 'bus', 'other' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec contact
-
1
class OrganizationContactComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
purpose: [ 'BILL', 'ADMIN', 'HR', 'PAYOR', 'PATINF', 'PRESS' ]
-
}
-
-
1
embeds_one :purpose, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :name, class_name:'FHIR::HumanName'
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
1
embeds_one :address, class_name:'FHIR::Address'
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :active, type: Boolean
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
field :name, type: String
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
1
embeds_many :address, class_name:'FHIR::Address'
-
1
embeds_one :partOf, class_name:'FHIR::Reference'
-
1
embeds_many :contact, class_name:'FHIR::Organization::OrganizationContactComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Patient
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Patient
-
-
1
SEARCH_PARAMS = [
-
'birthdate',
-
'deceased',
-
'address-state',
-
'gender',
-
'animal-species',
-
'link',
-
'language',
-
'deathdate',
-
'animal-breed',
-
'address-country',
-
'phonetic',
-
'telecom',
-
'address-city',
-
'email',
-
'identifier',
-
'given',
-
'address',
-
'active',
-
'address-postalcode',
-
'careprovider',
-
'phone',
-
'organization',
-
'name',
-
'address-use',
-
'family'
-
]
-
-
1
VALID_CODES = {
-
gender: [ 'male', 'female', 'other', 'unknown' ],
-
maritalStatus: [ 'U', 'A', 'D', 'I', 'L', 'M', 'P', 'S', 'T', 'W', 'UNK' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
deceased: [ 'deceasedBoolean', 'deceasedDateTime' ],
-
multipleBirth: [ 'multipleBirthBoolean', 'multipleBirthInteger' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec contact
-
1
class ContactComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
gender: [ 'male', 'female', 'other', 'unknown' ],
-
relationship: [ 'emergency', 'family', 'guardian', 'friend', 'partner', 'work', 'caregiver', 'agent', 'guarantor', 'owner', 'parent' ]
-
}
-
-
1
embeds_many :relationship, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :name, class_name:'FHIR::HumanName'
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
1
embeds_one :address, class_name:'FHIR::Address'
-
1
field :gender, type: String
-
1
validates :gender, :inclusion => { in: VALID_CODES[:gender], :allow_nil => true }
-
1
embeds_one :organization, class_name:'FHIR::Reference'
-
1
embeds_one :period, class_name:'FHIR::Period'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec animal
-
1
class AnimalComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
species: [ 'canislf', 'ovisa', 'serinuscd' ],
-
breed: [ 'gsd', 'irt', 'tibmas', 'gret' ],
-
genderStatus: [ 'neutered', 'intact', 'unknown' ]
-
}
-
-
1
embeds_one :species, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :species
-
1
embeds_one :breed, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :genderStatus, class_name:'FHIR::CodeableConcept'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec communication
-
1
class PatientCommunicationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :language, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :language
-
1
field :preferred, type: Boolean
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec link
-
1
class PatientLinkComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirType: [ 'replace', 'refer', 'seealso' ]
-
}
-
-
1
embeds_one :other, class_name:'FHIR::Reference'
-
1
validates_presence_of :other
-
1
field :fhirType, type: String
-
1
validates_presence_of :fhirType
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :active, type: Boolean
-
1
embeds_many :name, class_name:'FHIR::HumanName'
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
1
field :gender, type: String
-
1
validates :gender, :inclusion => { in: VALID_CODES[:gender], :allow_nil => true }
-
1
field :birthDate, type: String
-
1
validates :birthDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
1
field :deceasedBoolean, type: Boolean
-
1
field :deceasedDateTime, type: String
-
1
validates :deceasedDateTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_many :address, class_name:'FHIR::Address'
-
1
embeds_one :maritalStatus, class_name:'FHIR::CodeableConcept'
-
1
field :multipleBirthBoolean, type: Boolean
-
1
field :multipleBirthInteger, type: Integer
-
1
embeds_many :photo, class_name:'FHIR::Attachment'
-
1
embeds_many :contact, class_name:'FHIR::Patient::ContactComponent'
-
1
embeds_one :animal, class_name:'FHIR::Patient::AnimalComponent'
-
1
embeds_many :communication, class_name:'FHIR::Patient::PatientCommunicationComponent'
-
1
embeds_many :careProvider, class_name:'FHIR::Reference'
-
1
embeds_one :managingOrganization, class_name:'FHIR::Reference'
-
1
embeds_many :link, class_name:'FHIR::Patient::PatientLinkComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class PaymentNotice
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::PaymentNotice
-
-
1
SEARCH_PARAMS = [
-
'identifier'
-
]
-
-
1
VALID_CODES = {
-
ruleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
originalRuleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
paymentStatus: [ 'paid', 'cleared' ]
-
}
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :ruleset, class_name:'FHIR::Coding'
-
1
embeds_one :originalRuleset, class_name:'FHIR::Coding'
-
1
field :created, type: String
-
1
validates :created, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :target, class_name:'FHIR::Reference'
-
1
embeds_one :provider, class_name:'FHIR::Reference'
-
1
embeds_one :organization, class_name:'FHIR::Reference'
-
1
embeds_one :request, class_name:'FHIR::Reference'
-
1
embeds_one :response, class_name:'FHIR::Reference'
-
1
embeds_one :paymentStatus, class_name:'FHIR::Coding'
-
1
validates_presence_of :paymentStatus
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class PaymentReconciliation
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::PaymentReconciliation
-
-
1
SEARCH_PARAMS = [
-
'identifier'
-
]
-
-
1
VALID_CODES = {
-
form: [ '1', '2' ],
-
ruleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
originalRuleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
outcome: [ 'complete', 'error' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec detail
-
1
class DetailsComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirType: [ 'payment', 'adjustment', 'advance' ]
-
}
-
-
1
embeds_one :fhirType, class_name:'FHIR::Coding'
-
1
validates_presence_of :fhirType
-
1
embeds_one :request, class_name:'FHIR::Reference'
-
1
embeds_one :responce, class_name:'FHIR::Reference'
-
1
embeds_one :submitter, class_name:'FHIR::Reference'
-
1
embeds_one :payee, class_name:'FHIR::Reference'
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
1
embeds_one :amount, class_name:'FHIR::Quantity'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec note
-
1
class NotesComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirType: [ 'display', 'print', 'printoper' ]
-
}
-
-
1
embeds_one :fhirType, class_name:'FHIR::Coding'
-
1
field :text, type: String
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :request, class_name:'FHIR::Reference'
-
1
field :outcome, type: String
-
1
validates :outcome, :inclusion => { in: VALID_CODES[:outcome], :allow_nil => true }
-
1
field :disposition, type: String
-
1
embeds_one :ruleset, class_name:'FHIR::Coding'
-
1
embeds_one :originalRuleset, class_name:'FHIR::Coding'
-
1
field :created, type: String
-
1
validates :created, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
embeds_one :organization, class_name:'FHIR::Reference'
-
1
embeds_one :requestProvider, class_name:'FHIR::Reference'
-
1
embeds_one :requestOrganization, class_name:'FHIR::Reference'
-
1
embeds_many :detail, class_name:'FHIR::PaymentReconciliation::DetailsComponent'
-
1
embeds_one :form, class_name:'FHIR::Coding'
-
1
embeds_one :total, class_name:'FHIR::Quantity'
-
1
validates_presence_of :total
-
1
embeds_many :note, class_name:'FHIR::PaymentReconciliation::NotesComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Period
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Period
-
-
1
field :start, type: String
-
1
validates :start, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :end, type: String
-
1
validates :end, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Person
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Person
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'address',
-
'birthdate',
-
'address-state',
-
'gender',
-
'practitioner',
-
'link',
-
'relatedperson',
-
'address-postalcode',
-
'address-country',
-
'phonetic',
-
'phone',
-
'patient',
-
'organization',
-
'name',
-
'address-use',
-
'telecom',
-
'address-city',
-
'email'
-
]
-
-
1
VALID_CODES = {
-
gender: [ 'male', 'female', 'other', 'unknown' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec link
-
1
class PersonLinkComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
assurance: [ 'level1', 'level2', 'level3', 'level4' ]
-
}
-
-
1
embeds_one :target, class_name:'FHIR::Reference'
-
1
validates_presence_of :target
-
1
field :assurance, type: String
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_many :name, class_name:'FHIR::HumanName'
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
1
field :gender, type: String
-
1
validates :gender, :inclusion => { in: VALID_CODES[:gender], :allow_nil => true }
-
1
field :birthDate, type: String
-
1
validates :birthDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
1
embeds_many :address, class_name:'FHIR::Address'
-
1
embeds_one :photo, class_name:'FHIR::Attachment'
-
1
embeds_one :managingOrganization, class_name:'FHIR::Reference'
-
1
field :active, type: Boolean
-
1
embeds_many :link, class_name:'FHIR::Person::PersonLinkComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Practitioner
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Practitioner
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'given',
-
'specialty',
-
'address',
-
'role',
-
'address-state',
-
'gender',
-
'address-postalcode',
-
'address-country',
-
'phonetic',
-
'phone',
-
'organization',
-
'name',
-
'address-use',
-
'telecom',
-
'location',
-
'family',
-
'address-city',
-
'communication',
-
'email'
-
]
-
-
1
VALID_CODES = {
-
gender: [ 'male', 'female', 'other', 'unknown' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec practitionerRole
-
1
class PractitionerPractitionerRoleComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
specialty: [ 'cardio', 'dent', 'dietary', 'midw', 'sysarch' ],
-
role: [ 'doctor', 'nurse', 'pharmacist', 'researcher', 'teacher', 'ict' ]
-
}
-
-
1
embeds_one :managingOrganization, class_name:'FHIR::Reference'
-
1
embeds_one :role, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :specialty, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
embeds_many :location, class_name:'FHIR::Reference'
-
1
embeds_many :healthcareService, class_name:'FHIR::Reference'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec qualification
-
1
class PractitionerQualificationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
code: [ '100000', '111000', '111111', '111200', '111211', '111212', '111300', '111311', '111312', '111399', '121000', '121111', '121200', '121211', '121212', '121213', '121214', '121215', '121216', '121217', '121218', '121221', '121299', '121300', '121311', '121312', '121313', '121314', '121315', '121316', '121317', '121318', '121321', '121322', '121399', '121411', '130000', '131100', '131111', '131112', '132000', '132111', '132211', '132311', '132411', '132511', '133000', '133100', '133111', '133112', '133211', '133300', '133311', '133312', '133411', '133500', '133511', '133512', '133513', '133611', '134000', '134111', '134200', '134211', '134212', '134213', '134214', '134299', '134311', '134400', '134411', '134412', '134499', '135100', '135111', '135112', '135199', '139000', '139100', '139111', '139112', '139113', '139211', '139900', '139911', '139912', '139913', '139914', '139915', '139999', '140000', '141000', '141111', '141211', '141311', '141411', '141900', '141911', '141999', '142100', '142111', '142112', '142113', '142114', '142115', '142116', '149000', '149100', '149111', '149112', '149113', '149200', '149211', '149212', '149311', '149400', '149411', '149412', '149413', '149900', '149911', '149912', '149913', '149914', '149999', '200000', '210000', '211000', '211100', '211111', '211112', '211113', '211199', '211200', '211211', '211212', '211213', '211214', '211299', '211311', '211400', '211411', '211412', '211413', '211499', '212000', '212100', '212111', '212112', '212113', '212114', '212200', '212211', '212212', '212300', '212311', '212312', '212313', '212314', '212315', '212316', '212317', '212318', '212399', '212400', '212411', '212412', '212413', '212414', '212415', '212416', '212499', '220000', '221000', '221100', '221111', '221112', '221113', '221200', '221211', '221212', '221213', '221214', '222000', '222100', '222111', '222112', '222113', '222199', '222200', '222211', '222212', '222213', '222299', '222300', '222311', '222312', '223000', '223100', '223111', '223112', '223113', '223211', '223311', '224000', '224100', '224111', '224112', '224113', '224200', '224211', '224212', '224213', '224214', '224311', '224400', '224411', '224412', '224500', '224511', '224512', '224611', '224700', '224711', '224712', '224900', '224911', '224912', '224913', '224914', '224999', '225000', '225100', '225111', '225112', '225113', '225200', '225211', '225212', '225213', '225311', '225400', '225411', '225412', '225499', '230000', '231000', '231100', '231111', '231112', '231113', '231114', '231199', '231200', '231211', '231212', '231213', '231214', '231215', '231299', '232000', '232100', '232111', '232112', '232200', '232211', '232212', '232300', '232311', '232312', '232313', '232400', '232411', '232412', '232413', '232414', '232511', '232611', '233000', '233100', '233111', '233112', '233200', '233211', '233212', '233213', '233214', '233215', '233311', '233411', '233500', '233511', '233512', '233513', '233600', '233611', '233612', '233900', '233911', '233912', '233913', '233914', '233915', '233916', '233999', '234000', '234100', '234111', '234112', '234113', '234200', '234211', '234212', '234213', '234300', '234311', '234312', '234313', '234314', '234399', '234400', '234411', '234412', '234500', '234511', '234512', '234513', '234514', '234515', '234516', '234517', '234518', '234599', '234611', '234711', '234900', '234911', '234912', '234913', '234914', '234999', '240000', '241000', '241111', '241213', '241311', '241411', '241500', '241511', '241512', '241513', '241599', '242000', '242100', '242111', '242112', '242211', '249000', '249100', '249111', '249112', '249200', '249211', '249212', '249213', '249214', '249299', '249311', '250000', '251000', '251111', '251200', '251211', '251212', '251213', '251214', '251300', '251311', '251312', '251400', '251411', '251412', '251500', '251511', '251512', '251513', '251900', '251911', '251912', '251999', '252000', '252100', '252111', '252112', '252200', '252211', '252212', '252213', '252214', '252299', '252300', '252311', '252312', '252411', '252511', '252611', '252700', '252711', '252712', '253000', '253100', '253111', '253112', '253211', '253300', '253311', '253312', '253313', '253314', '253315', '253316', '253317', '253318', '253321', '253322', '253323', '253324', '253399', '253411', '253500', '253511', '253512', '253513', '253514', '253515', '253516', '253517', '253518', '253521', '253900', '253911', '253912', '253913', '253914', '253915', '253916', '253999', '254000', '254111', '254200', '254211', '254212', '254311', '254400', '254411', '254412', '254413', '254414', '254415', '254416', '254417', '254418', '254421', '254422', '254423', '254424', '254499', '260000', '261000', '261100', '261111', '261112', '261200', '261211', '261212', '261300', '261311', '261312', '261313', '261399', '262100', '262111', '262112', '262113', '263000', '263100', '263111', '263112', '263113', '263200', '263211', '263212', '263213', '263299', '263300', '263311', '263312', '270000', '271000', '271111', '271200', '271211', '271212', '271213', '271299', '271311', '272000', '272100', '272111', '272112', '272113', '272114', '272115', '272199', '272211', '272300', '272311', '272312', '272313', '272314', '272399', '272400', '272411', '272412', '272413', '272499', '272511', '272600', '272611', '272612', '272613', '300000', '310000', '311000', '311111', '311200', '311211', '311212', '311213', '311214', '311215', '311299', '311300', '311311', '311312', '311313', '311399', '311400', '311411', '311412', '311413', '311414', '311499', '312000', '312100', '312111', '312112', '312113', '312114', '312115', '312116', '312200', '312211', '312212', '312300', '312311', '312312', '312400', '312411', '312412', '312500', '312511', '312512', '312611', '312900', '312911', '312912', '312913', '312999', '313000', '313100', '313111', '313112', '313113', '313199', '313200', '313211', '313212', '313213', '313214', '320000', '321000', '321111', '321200', '321211', '321212', '321213', '321214', '322000', '322100', '322111', '322112', '322113', '322114', '322115', '322211', '322300', '322311', '322312', '322313', '323000', '323100', '323111', '323112', '323113', '323200', '323211', '323212', '323213', '323214', '323215', '323299', '323300', '323311', '323312', '323313', '323314', '323315', '323316', '323400', '323411', '323412', '324000', '324111', '324200', '324211', '324212', '324311', '330000', '331000', '331100', '331111', '331112', '331211', '331212', '331213', '332000', '332111', '332211', '333000', '333111', '333200', '333211', '333212', '333311', '333411', '334100', '334111', '334112', '334113', '334114', '334115', '340000', '341100', '341111', '341112', '341113', '342000', '342111', '342200', '342211', '342212', '342300', '342311', '342312', '342313', '342314', '342315', '342400', '342411', '342412', '342413', '342414', '351000', '351100', '351111', '351112', '351211', '351311', '351411', '360000', '361000', '361100', '361111', '361112', '361113', '361114', '361199', '361211', '361311', '362000', '362111', '362200', '362211', '362212', '362213', '362311', '362411', '390000', '391111', '392000', '392100', '392111', '392112', '392211', '392300', '392311', '392312', '393000', '393100', '393111', '393112', '393113', '393114', '393200', '393211', '393212', '393213', '393299', '393311', '394000', '394111', '394200', '394211', '394212', '394213', '394214', '394299', '399000', '399100', '399111', '399112', '399200', '399211', '399212', '399213', '399300', '399311', '399312', '399411', '399500', '399511', '399512', '399513', '399514', '399515', '399516', '399517', '399599', '399611', '399900', '399911', '399912', '399913', '399914', '399915', '399916', '399917', '399999', '400000', '411000', '411100', '411111', '411112', '411200', '411211', '411212', '411213', '411214', '411311', '411400', '411411', '411412', '411511', '411611', '411700', '411711', '411712', '411713', '411714', '411715', '411716', '420000', '421100', '421111', '421112', '421113', '421114', '422100', '422111', '422112', '422115', '422116', '423000', '423111', '423211', '423300', '423311', '423312', '423313', '423314', '423400', '423411', '423412', '423413', '431000', '431100', '431111', '431112', '431211', '431311', '431411', '431511', '431900', '431911', '431912', '431999', '440000', '441000', '441111', '441200', '441211', '441212', '441300', '441311', '441312', '442000', '442111', '442200', '442211', '442212', '442213', '442214', '442215', '442216', '442217', '442299', '450000', '451000', '451111', '451211', '451300', '451311', '451399', '451400', '451411', '451412', '451500', '451511', '451512', '451600', '451611', '451612', '451700', '451711', '451799', '451800', '451811', '451812', '451813', '451899', '452000', '452111', '452200', '452211', '452212', '452213', '452214', '452215', '452216', '452217', '452299', '452300', '452311', '452312', '452313', '452314', '452315', '452316', '452317', '452318', '452321', '452322', '452323', '452400', '452411', '452412', '452413', '452414', '452499', '500000', '510000', '511100', '511111', '511112', '512000', '512111', '512200', '512211', '512299', '521000', '521111', '521200', '521211', '521212', '530000', '531111', '532100', '532111', '532112', '532113', '540000', '541000', '541100', '541111', '541112', '541211', '542100', '542111', '542112', '542113', '542114', '550000', '551000', '551100', '551111', '551112', '551211', '551311', '552000', '552111', '552211', '552300', '552311', '552312', '552313', '552314', '561000', '561100', '561111', '561112', '561113', '561199', '561200', '561211', '561212', '561311', '561400', '561411', '561412', '561511', '561611', '561900', '561911', '561912', '561913', '561999', '590000', '591000', '591100', '591111', '591112', '591113', '591114', '591115', '591116', '591200', '591211', '591212', '599000', '599100', '599111', '599112', '599200', '599211', '599212', '599213', '599214', '599215', '599311', '599411', '599500', '599511', '599512', '599513', '599514', '599515', '599516', '599517', '599518', '599521', '599599', '599600', '599611', '599612', '599613', '599711', '599900', '599911', '599912', '599913', '599914', '599999', '600000', '610000', '611000', '611100', '611111', '611112', '611211', '611300', '611311', '611312', '611313', '611314', '611399', '612100', '612111', '612112', '612113', '612114', '612115', '621000', '621111', '621211', '621300', '621311', '621312', '621411', '621511', '621611', '621700', '621711', '621712', '621713', '621900', '621911', '621912', '621999', '630000', '631100', '631111', '631112', '639000', '639100', '639111', '639112', '639200', '639211', '639212', '639311', '639400', '639411', '639412', '639511', '639911', '700000', '710000', '711000', '711100', '711111', '711112', '711113', '711114', '711199', '711211', '711300', '711311', '711312', '711411', '711500', '711511', '711512', '711513', '711514', '711515', '711516', '711599', '711611', '711700', '711711', '711712', '711713', '711714', '711715', '711716', '711799', '711900', '711911', '711912', '711913', '711914', '711999', '712000', '712111', '712200', '712211', '712212', '712213', '712311', '712900', '712911', '712912', '712913', '712914', '712915', '712916', '712917', '712918', '712921', '712922', '712999', '721000', '721100', '721111', '721112', '721200', '721211', '721212', '721213', '721214', '721215', '721216', '721311', '721900', '721911', '721912', '721913', '721914', '721915', '721916', '721999', '730000', '731000', '731100', '731111', '731112', '731199', '731200', '731211', '731212', '731213', '731300', '731311', '731312', '732111', '733100', '733111', '733112', '733113', '733114', '733115', '741111', '800000', '811000', '811111', '811211', '811311', '811400', '811411', '811412', '811500', '811511', '811512', '811513', '811600', '811611', '811612', '811699', '821000', '821100', '821111', '821112', '821113', '821114', '821211', '821311', '821400', '821411', '821412', '821511', '821611', '821700', '821711', '821712', '821713', '821714', '821900', '821911', '821912', '821913', '821914', '821915', '830000', '831000', '831100', '831111', '831112', '831113', '831114', '831115', '831116', '831117', '831118', '831199', '831200', '831211', '831212', '831300', '831311', '831312', '831313', '832000', '832100', '832111', '832112', '832113', '832114', '832115', '832199', '832211', '839000', '839111', '839200', '839211', '839212', '839300', '839311', '839312', '839313', '839400', '839411', '839412', '839413', '839900', '839911', '839912', '839913', '839914', '839915', '839916', '839917', '839999', '841000', '841111', '841200', '841211', '841212', '841213', '841214', '841215', '841216', '841299', '841300', '841311', '841312', '841313', '841400', '841411', '841412', '841500', '841511', '841512', '841513', '841514', '841515', '841516', '841517', '841599', '841611', '841900', '841911', '841912', '841999', '851000', '851111', '851200', '851211', '851299', '851311', '890000', '891000', '891100', '891111', '891112', '891113', '891211', '899000', '899111', '899200', '899211', '899212', '899311', '899400', '899411', '899412', '899413', '899414', '899415', '899500', '899511', '899512', '899611', '899711', '899900', '899911', '899912', '899913', '899914', '899915', '899916', '899917', '899918', '899921', '899922', '899999' ]
-
}
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :code
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
embeds_one :issuer, class_name:'FHIR::Reference'
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :active, type: Boolean
-
1
embeds_one :name, class_name:'FHIR::HumanName'
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
1
embeds_many :address, class_name:'FHIR::Address'
-
1
field :gender, type: String
-
1
validates :gender, :inclusion => { in: VALID_CODES[:gender], :allow_nil => true }
-
1
field :birthDate, type: String
-
1
validates :birthDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
1
embeds_many :photo, class_name:'FHIR::Attachment'
-
1
embeds_many :practitionerRole, class_name:'FHIR::Practitioner::PractitionerPractitionerRoleComponent'
-
1
embeds_many :qualification, class_name:'FHIR::Practitioner::PractitionerQualificationComponent'
-
1
embeds_many :communication, class_name:'FHIR::CodeableConcept'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Procedure
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Procedure
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'identifier',
-
'code',
-
'performer',
-
'subject',
-
'patient',
-
'location',
-
'encounter'
-
]
-
-
1
VALID_CODES = {
-
followUp: [ '18949003', '30549001', '241031001', '35963001', '225164002', '447346005', '229506003', '274441001', '394725008', '359825008' ],
-
category: [ '24642003', '409063005', '409073007', '387713003', '103693007', '46947000' ],
-
outcome: [ '385669000', '385671000', '385670004' ],
-
status: [ 'in-progress', 'aborted', 'completed', 'entered-in-error' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
reason: [ 'reasonCodeableConcept', 'reasonReference' ],
-
performed: [ 'performedDateTime', 'performedPeriod' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec performer
-
1
class ProcedurePerformerComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :actor, class_name:'FHIR::Reference'
-
1
embeds_one :role, class_name:'FHIR::CodeableConcept'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec focalDevice
-
1
class ProcedureFocalDeviceComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
action: [ 'implanted', 'explanted', 'manipulated' ]
-
}
-
-
1
embeds_one :action, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :manipulated, class_name:'FHIR::Reference'
-
1
validates_presence_of :manipulated
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
validates_presence_of :subject
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
embeds_one :category, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :code
-
1
field :notPerformed, type: Boolean
-
1
embeds_many :reasonNotPerformed, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :bodySite, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :reasonCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :reasonReference, class_name:'FHIR::Reference'
-
1
embeds_many :performer, class_name:'FHIR::Procedure::ProcedurePerformerComponent'
-
1
field :performedDateTime, type: String
-
1
validates :performedDateTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :performedPeriod, class_name:'FHIR::Period'
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
embeds_one :location, class_name:'FHIR::Reference'
-
1
embeds_one :outcome, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :report, class_name:'FHIR::Reference'
-
1
embeds_many :complication, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :followUp, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :request, class_name:'FHIR::Reference'
-
1
embeds_many :notes, class_name:'FHIR::Annotation'
-
1
embeds_many :focalDevice, class_name:'FHIR::Procedure::ProcedureFocalDeviceComponent'
-
1
embeds_many :used, class_name:'FHIR::Reference'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class ProcedureRequest
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::ProcedureRequest
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'performer',
-
'subject',
-
'patient',
-
'orderer',
-
'encounter'
-
]
-
-
1
VALID_CODES = {
-
priority: [ 'routine', 'urgent', 'stat', 'asap' ],
-
status: [ 'proposed', 'draft', 'requested', 'received', 'accepted', 'in-progress', 'completed', 'suspended', 'rejected', 'aborted' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
asNeeded: [ 'asNeededBoolean', 'asNeededCodeableConcept' ],
-
reason: [ 'reasonCodeableConcept', 'reasonReference' ],
-
scheduled: [ 'scheduledDateTime', 'scheduledPeriod', 'scheduledTiming' ]
-
}
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
validates_presence_of :subject
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :code
-
1
embeds_many :bodySite, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :reasonCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :reasonReference, class_name:'FHIR::Reference'
-
1
field :scheduledDateTime, type: String
-
1
validates :scheduledDateTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :scheduledPeriod, class_name:'FHIR::Period'
-
1
embeds_one :scheduledTiming, class_name:'FHIR::Timing'
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
embeds_one :performer, class_name:'FHIR::Reference'
-
1
field :status, type: String
-
1
embeds_many :notes, class_name:'FHIR::Annotation'
-
1
field :asNeededBoolean, type: Boolean
-
1
embeds_one :asNeededCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
field :orderedOn, type: String
-
1
validates :orderedOn, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :orderer, class_name:'FHIR::Reference'
-
1
field :priority, type: String
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class ProcessRequest
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::ProcessRequest
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'provider',
-
'organization',
-
'action'
-
]
-
-
1
VALID_CODES = {
-
ruleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
action: [ 'cancel', 'poll', 'reprocess', 'status' ],
-
originalRuleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec item
-
1
class ItemsComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :sequenceLinkId, type: Integer
-
1
validates_presence_of :sequenceLinkId
-
end
-
-
1
field :action, type: String
-
1
validates_presence_of :action
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :ruleset, class_name:'FHIR::Coding'
-
1
embeds_one :originalRuleset, class_name:'FHIR::Coding'
-
1
field :created, type: String
-
1
validates :created, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :target, class_name:'FHIR::Reference'
-
1
embeds_one :provider, class_name:'FHIR::Reference'
-
1
embeds_one :organization, class_name:'FHIR::Reference'
-
1
embeds_one :request, class_name:'FHIR::Reference'
-
1
embeds_one :response, class_name:'FHIR::Reference'
-
1
field :nullify, type: Boolean
-
1
field :reference, type: String
-
1
embeds_many :item, class_name:'FHIR::ProcessRequest::ItemsComponent'
-
1
field :include, type: Array # Array of Strings
-
1
field :exclude, type: Array # Array of Strings
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class ProcessResponse
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::ProcessResponse
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'request',
-
'organization',
-
'requestprovider',
-
'requestorganization'
-
]
-
-
1
VALID_CODES = {
-
form: [ '1', '2' ],
-
ruleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
originalRuleset: [ 'x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3' ],
-
error: [ 'A001', 'A002' ],
-
outcome: [ 'complete', 'pended', 'error' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec notes
-
1
class ProcessResponseNotesComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirType: [ 'display', 'print', 'printoper' ]
-
}
-
-
1
embeds_one :fhirType, class_name:'FHIR::Coding'
-
1
field :text, type: String
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :request, class_name:'FHIR::Reference'
-
1
embeds_one :outcome, class_name:'FHIR::Coding'
-
1
field :disposition, type: String
-
1
embeds_one :ruleset, class_name:'FHIR::Coding'
-
1
embeds_one :originalRuleset, class_name:'FHIR::Coding'
-
1
field :created, type: String
-
1
validates :created, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :organization, class_name:'FHIR::Reference'
-
1
embeds_one :requestProvider, class_name:'FHIR::Reference'
-
1
embeds_one :requestOrganization, class_name:'FHIR::Reference'
-
1
embeds_one :form, class_name:'FHIR::Coding'
-
1
embeds_many :notes, class_name:'FHIR::ProcessResponse::ProcessResponseNotesComponent'
-
1
embeds_many :error, class_name:'FHIR::Coding'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Provenance
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Provenance
-
-
1
SEARCH_PARAMS = [
-
'sigtype',
-
'agent',
-
'entitytype',
-
'patient',
-
'start',
-
'end',
-
'location',
-
'userid',
-
'entity',
-
'target'
-
]
-
# This is an ugly hack to deal with embedded structures in the spec relatedAgent
-
1
class ProvenanceAgentRelatedAgentComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :fhirType
-
1
field :target, type: String
-
1
validates_presence_of :target
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec agent
-
1
class ProvenanceAgentComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
role: [ 'enterer', 'performer', 'author', 'verifier', 'legal', 'attester', 'informant', 'custodian', 'assembler', 'composer' ]
-
}
-
-
1
embeds_one :role, class_name:'FHIR::Coding'
-
1
validates_presence_of :role
-
1
embeds_one :actor, class_name:'FHIR::Reference'
-
1
embeds_one :userId, class_name:'FHIR::Identifier'
-
1
embeds_many :relatedAgent, class_name:'FHIR::Provenance::ProvenanceAgentRelatedAgentComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec entity
-
1
class ProvenanceEntityComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
role: [ 'derivation', 'revision', 'quotation', 'source' ]
-
}
-
-
1
field :role, type: String
-
1
validates_presence_of :role
-
1
embeds_one :fhirType, class_name:'FHIR::Coding'
-
1
validates_presence_of :fhirType
-
1
field :reference, type: String
-
1
validates_presence_of :reference
-
1
field :display, type: String
-
1
embeds_one :agent, class_name:'FHIR::Provenance::ProvenanceAgentComponent'
-
end
-
-
1
embeds_many :target, class_name:'FHIR::Reference'
-
1
validates_presence_of :target
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
field :recorded, type: String
-
1
validates :recorded, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
1
validates_presence_of :recorded
-
1
embeds_many :reason, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :activity, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :location, class_name:'FHIR::Reference'
-
1
field :policy, type: Array # Array of Strings
-
1
embeds_many :agent, class_name:'FHIR::Provenance::ProvenanceAgentComponent'
-
1
embeds_many :entity, class_name:'FHIR::Provenance::ProvenanceEntityComponent'
-
1
embeds_many :signature, class_name:'FHIR::Signature'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Quantity
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Quantity
-
-
-
1
VALID_CODES = {
-
comparator: [ '<', '<=', '>=', '>' ]
-
}
-
-
1
field :value, type: Float
-
1
field :comparator, type: String
-
1
field :unit, type: String
-
1
field :system, type: String
-
1
field :code, type: String
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Questionnaire
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Questionnaire
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'identifier',
-
'code',
-
'publisher',
-
'title',
-
'version',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'draft', 'published', 'retired' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec question
-
1
class QuestionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirType: [ 'boolean', 'decimal', 'integer', 'date', 'dateTime', 'instant', 'time', 'string', 'text', 'url', 'choice', 'open-choice', 'attachment', 'reference', 'quantity' ]
-
}
-
-
1
field :linkId, type: String
-
1
embeds_many :concept, class_name:'FHIR::Coding'
-
1
field :text, type: String
-
1
field :fhirType, type: String
-
1
field :required, type: Boolean
-
1
field :repeats, type: Boolean
-
1
embeds_one :options, class_name:'FHIR::Reference'
-
1
embeds_many :option, class_name:'FHIR::Coding'
-
1
embeds_many :group, class_name:'FHIR::Questionnaire::GroupComponent', cyclic: true
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec group
-
1
class GroupComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :linkId, type: String
-
1
field :title, type: String
-
1
embeds_many :concept, class_name:'FHIR::Coding'
-
1
field :text, type: String
-
1
field :required, type: Boolean
-
1
field :repeats, type: Boolean
-
1
embeds_many :group, class_name:'FHIR::Questionnaire::GroupComponent', cyclic: true
-
1
embeds_many :question, class_name:'FHIR::Questionnaire::QuestionComponent', cyclic: true
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :versionNum, type: String
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :publisher, type: String
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
1
field :subjectType, type: Array # Array of Strings
-
1
embeds_one :group, class_name:'FHIR::Questionnaire::GroupComponent'
-
1
validates_presence_of :group
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class QuestionnaireResponse
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::QuestionnaireResponse
-
-
1
SEARCH_PARAMS = [
-
'authored',
-
'questionnaire',
-
'subject',
-
'author',
-
'patient',
-
'encounter',
-
'source',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'in-progress', 'completed', 'amended' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec answer
-
1
class QuestionAnswerComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
value: [ 'valueBoolean', 'valueDecimal', 'valueInteger', 'valueDate', 'valueDateTime', 'valueInstant', 'valueTime', 'valueString', 'valueUri', 'valueAttachment', 'valueCoding', 'valueQuantity', 'valueReference' ]
-
}
-
-
1
field :valueBoolean, type: Boolean
-
1
field :valueDecimal, type: Float
-
1
field :valueInteger, type: Integer
-
1
field :valueDate, type: String
-
1
validates :valueDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
1
field :valueDateTime, type: String
-
1
validates :valueDateTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :valueInstant, type: String
-
1
validates :valueInstant, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
1
field :valueTime, type: String
-
1
validates :valueTime, :allow_nil => true, :format => { with: /\A([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?\Z/ }
-
1
field :valueString, type: String
-
1
field :valueUri, type: String
-
1
embeds_one :valueAttachment, class_name:'FHIR::Attachment'
-
1
embeds_one :valueCoding, class_name:'FHIR::Coding'
-
1
embeds_one :valueQuantity, class_name:'FHIR::Quantity'
-
1
embeds_one :valueReference, class_name:'FHIR::Reference'
-
1
embeds_many :group, class_name:'FHIR::QuestionnaireResponse::GroupComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec question
-
1
class QuestionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :linkId, type: String
-
1
field :text, type: String
-
1
embeds_many :answer, class_name:'FHIR::QuestionnaireResponse::QuestionAnswerComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec group
-
1
class GroupComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :linkId, type: String
-
1
field :title, type: String
-
1
field :text, type: String
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
embeds_many :group, class_name:'FHIR::QuestionnaireResponse::GroupComponent'
-
1
embeds_many :question, class_name:'FHIR::QuestionnaireResponse::QuestionComponent'
-
end
-
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :questionnaire, class_name:'FHIR::Reference'
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
embeds_one :author, class_name:'FHIR::Reference'
-
1
field :authored, type: String
-
1
validates :authored, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :source, class_name:'FHIR::Reference'
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
embeds_one :group, class_name:'FHIR::QuestionnaireResponse::GroupComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Range
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Range
-
-
1
embeds_one :low, class_name:'FHIR::Quantity'
-
1
embeds_one :high, class_name:'FHIR::Quantity'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Ratio
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Ratio
-
-
1
embeds_one :numerator, class_name:'FHIR::Quantity'
-
1
embeds_one :denominator, class_name:'FHIR::Quantity'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Reference
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Reference
-
-
1
field :reference, type: String
-
1
field :display, type: String
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class ReferralRequest
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::ReferralRequest
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'requester',
-
'specialty',
-
'patient',
-
'recipient',
-
'type',
-
'priority',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'draft', 'requested', 'active', 'cancelled', 'accepted', 'rejected', 'completed' ]
-
}
-
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :specialty, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :priority, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
embeds_one :requester, class_name:'FHIR::Reference'
-
1
embeds_many :recipient, class_name:'FHIR::Reference'
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
field :dateSent, type: String
-
1
validates :dateSent, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :reason, class_name:'FHIR::CodeableConcept'
-
1
field :description, type: String
-
1
embeds_many :serviceRequested, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :supportingInformation, class_name:'FHIR::Reference'
-
1
embeds_one :fulfillmentTime, class_name:'FHIR::Period'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class RelatedPerson
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::RelatedPerson
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'address',
-
'birthdate',
-
'address-state',
-
'gender',
-
'address-postalcode',
-
'address-country',
-
'phonetic',
-
'phone',
-
'patient',
-
'name',
-
'address-use',
-
'telecom',
-
'address-city',
-
'email'
-
]
-
-
1
VALID_CODES = {
-
gender: [ 'male', 'female', 'other', 'unknown' ]
-
}
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
validates_presence_of :patient
-
1
embeds_one :relationship, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :name, class_name:'FHIR::HumanName'
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
1
field :gender, type: String
-
1
validates :gender, :inclusion => { in: VALID_CODES[:gender], :allow_nil => true }
-
1
field :birthDate, type: String
-
1
validates :birthDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
1
embeds_many :address, class_name:'FHIR::Address'
-
1
embeds_many :photo, class_name:'FHIR::Attachment'
-
1
embeds_one :period, class_name:'FHIR::Period'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class RiskAssessment
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::RiskAssessment
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'identifier',
-
'condition',
-
'performer',
-
'method',
-
'subject',
-
'patient',
-
'encounter'
-
]
-
# This is an ugly hack to deal with embedded structures in the spec prediction
-
1
class RiskAssessmentPredictionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
probabilityDecimal: [ 'negligible', 'low', 'moderate', 'high', 'certain' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
probability: [ 'probabilityDecimal', 'probabilityRange', 'probabilityCodeableConcept' ],
-
when: [ 'whenPeriod', 'whenRange' ]
-
}
-
-
1
embeds_one :outcome, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :outcome
-
1
field :probabilityDecimal, type: Float
-
1
embeds_one :probabilityRange, class_name:'FHIR::Range'
-
1
embeds_one :probabilityCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
field :relativeRisk, type: Float
-
1
embeds_one :whenPeriod, class_name:'FHIR::Period'
-
1
embeds_one :whenRange, class_name:'FHIR::Range'
-
1
field :rationale, type: String
-
end
-
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :condition, class_name:'FHIR::Reference'
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
embeds_one :performer, class_name:'FHIR::Reference'
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :method, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :basis, class_name:'FHIR::Reference'
-
1
embeds_many :prediction, class_name:'FHIR::RiskAssessment::RiskAssessmentPredictionComponent'
-
1
field :mitigation, type: String
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class SampledData
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::SampledData
-
-
1
embeds_one :origin, class_name:'FHIR::Quantity'
-
1
validates_presence_of :origin
-
1
field :period, type: Float
-
1
validates_presence_of :period
-
1
field :factor, type: Float
-
1
field :lowerLimit, type: Float
-
1
field :upperLimit, type: Float
-
1
field :dimensions, type: Integer
-
1
validates_presence_of :dimensions
-
1
field :data, type: String
-
1
validates_presence_of :data
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Schedule
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Schedule
-
-
1
SEARCH_PARAMS = [
-
'actor',
-
'date',
-
'identifier',
-
'type'
-
]
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_many :fhirType, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :actor, class_name:'FHIR::Reference'
-
1
validates_presence_of :actor
-
1
embeds_one :planningHorizon, class_name:'FHIR::Period'
-
1
field :comment, type: String
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class SearchParameter
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::SearchParameter
-
-
1
SEARCH_PARAMS = [
-
'code',
-
'name',
-
'description',
-
'type',
-
'url',
-
'base',
-
'target'
-
]
-
-
1
VALID_CODES = {
-
xpathUsage: [ 'normal', 'phonetic', 'nearby', 'distance', 'other' ],
-
fhirType: [ 'number', 'date', 'string', 'token', 'reference', 'composite', 'quantity', 'uri' ],
-
status: [ 'draft', 'active', 'retired' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec contact
-
1
class SearchParameterContactComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :name, type: String
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
end
-
-
1
field :url, type: String
-
1
validates_presence_of :url
-
1
field :name, type: String
-
1
validates_presence_of :name
-
1
field :status, type: String
-
1
validates :status, :inclusion => { in: VALID_CODES[:status], :allow_nil => true }
-
1
field :experimental, type: Boolean
-
1
field :publisher, type: String
-
1
embeds_many :contact, class_name:'FHIR::SearchParameter::SearchParameterContactComponent'
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :requirements, type: String
-
1
field :code, type: String
-
1
validates_presence_of :code
-
1
field :base, type: String
-
1
validates_presence_of :base
-
1
field :fhirType, type: String
-
1
validates :fhirType, :inclusion => { in: VALID_CODES[:fhirType] }
-
1
validates_presence_of :fhirType
-
1
field :description, type: String
-
1
validates_presence_of :description
-
1
field :xpath, type: String
-
1
field :xpathUsage, type: String
-
1
field :target, type: Array # Array of Strings
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Signature
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Signature
-
-
-
1
VALID_CODES = {
-
fhirType: [ '1.2.840.10065.1.12.1.1', '1.2.840.10065.1.12.1.2', '1.2.840.10065.1.12.1.3', '1.2.840.10065.1.12.1.4', '1.2.840.10065.1.12.1.5', '1.2.840.10065.1.12.1.6', '1.2.840.10065.1.12.1.7', '1.2.840.10065.1.12.1.8', '1.2.840.10065.1.12.1.9', '1.2.840.10065.1.12.1.10', '1.2.840.10065.1.12.1.11', '1.2.840.10065.1.12.1.12', '1.2.840.10065.1.12.1.13', '1.2.840.10065.1.12.1.14', '1.2.840.10065.1.12.1.15', '1.2.840.10065.1.12.1.16', '1.2.840.10065.1.12.1.17' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
who: [ 'whoUri', 'whoReference' ]
-
}
-
-
1
embeds_many :fhirType, class_name:'FHIR::Coding'
-
1
validates_presence_of :fhirType
-
1
field :when, type: String
-
1
validates :when, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
1
validates_presence_of :when
-
1
field :whoUri, type: String
-
1
validates_presence_of :whoUri
-
1
embeds_one :whoReference, class_name:'FHIR::Reference'
-
1
validates_presence_of :whoReference
-
1
field :contentType, type: String
-
1
validates_presence_of :contentType
-
1
field :blob, type: String
-
1
validates_presence_of :blob
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Slot
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Slot
-
-
1
SEARCH_PARAMS = [
-
'schedule',
-
'identifier',
-
'start',
-
'slot-type',
-
'fb-type'
-
]
-
-
1
VALID_CODES = {
-
freeBusyType: [ 'busy', 'free', 'busy-unavailable', 'busy-tentative' ]
-
}
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :schedule, class_name:'FHIR::Reference'
-
1
validates_presence_of :schedule
-
1
field :freeBusyType, type: String
-
1
validates_presence_of :freeBusyType
-
1
field :start, type: String
-
1
validates :start, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
1
validates_presence_of :start
-
1
field :end, type: String
-
1
validates :end, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
1
validates_presence_of :end
-
1
field :overbooked, type: Boolean
-
1
field :comment, type: String
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Specimen
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Specimen
-
-
1
SEARCH_PARAMS = [
-
'container',
-
'identifier',
-
'parent',
-
'container-id',
-
'bodysite',
-
'subject',
-
'patient',
-
'collected',
-
'accession',
-
'type',
-
'collector'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'available', 'unavailable', 'unsatisfactory', 'entered-in-error' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec fhirCollection
-
1
class SpecimenCollectionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
method: [ '119295008', '413651001', '360020006', '430823004', '16404004', '67889009', '29240004', '45710003', '7800008', '258431006', '20255002', '386147002', '278450005' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
collected: [ 'collectedDateTime', 'collectedPeriod' ]
-
}
-
-
1
embeds_one :collector, class_name:'FHIR::Reference'
-
1
field :comment, type: Array # Array of Strings
-
1
field :collectedDateTime, type: String
-
1
validates :collectedDateTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :collectedPeriod, class_name:'FHIR::Period'
-
1
embeds_one :quantity, class_name:'FHIR::Quantity'
-
1
embeds_one :method, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :bodySite, class_name:'FHIR::CodeableConcept'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec treatment
-
1
class SpecimenTreatmentComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :description, type: String
-
1
embeds_one :procedure, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :additive, class_name:'FHIR::Reference'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec container
-
1
class SpecimenContainerComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
additive: [ 'additiveCodeableConcept', 'additiveReference' ]
-
}
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :description, type: String
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :capacity, class_name:'FHIR::Quantity'
-
1
embeds_one :specimenQuantity, class_name:'FHIR::Quantity'
-
1
embeds_one :additiveCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :additiveReference, class_name:'FHIR::Reference'
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :status, type: String
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
embeds_many :parent, class_name:'FHIR::Reference'
-
1
embeds_one :subject, class_name:'FHIR::Reference'
-
1
validates_presence_of :subject
-
1
embeds_one :accessionIdentifier, class_name:'FHIR::Identifier'
-
1
field :receivedTime, type: String
-
1
validates :receivedTime, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :fhirCollection, class_name:'FHIR::Specimen::SpecimenCollectionComponent'
-
1
embeds_many :treatment, class_name:'FHIR::Specimen::SpecimenTreatmentComponent'
-
1
embeds_many :container, class_name:'FHIR::Specimen::SpecimenContainerComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class StructureDefinition
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::StructureDefinition
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'identifier',
-
'code',
-
'valueset',
-
'kind',
-
'display',
-
'description',
-
'experimental',
-
'context-type',
-
'abstract',
-
'type',
-
'version',
-
'url',
-
'path',
-
'ext-context',
-
'name',
-
'context',
-
'base-path',
-
'publisher',
-
'status',
-
'base'
-
]
-
-
1
VALID_CODES = {
-
kind: [ 'datatype', 'resource', 'logical' ],
-
contextType: [ 'resource', 'datatype', 'mapping', 'extension' ],
-
status: [ 'draft', 'active', 'retired' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec contact
-
1
class StructureDefinitionContactComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :name, type: String
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec mapping
-
1
class StructureDefinitionMappingComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :fhirIdentity, type: String
-
1
validates_presence_of :fhirIdentity
-
1
field :uri, type: String
-
1
field :name, type: String
-
1
field :comments, type: String
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec snapshot
-
1
class StructureDefinitionSnapshotComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_many :element, class_name:'FHIR::ElementDefinition'
-
1
validates_presence_of :element
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec differential
-
1
class StructureDefinitionDifferentialComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_many :element, class_name:'FHIR::ElementDefinition'
-
1
validates_presence_of :element
-
end
-
-
1
field :url, type: String
-
1
validates_presence_of :url
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :versionNum, type: String
-
1
field :name, type: String
-
1
validates_presence_of :name
-
1
field :display, type: String
-
1
field :status, type: String
-
1
validates :status, :inclusion => { in: VALID_CODES[:status] }
-
1
validates_presence_of :status
-
1
field :experimental, type: Boolean
-
1
field :publisher, type: String
-
1
embeds_many :contact, class_name:'FHIR::StructureDefinition::StructureDefinitionContactComponent'
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :description, type: String
-
1
embeds_many :useContext, class_name:'FHIR::CodeableConcept'
-
1
field :requirements, type: String
-
1
field :copyright, type: String
-
1
embeds_many :code, class_name:'FHIR::Coding'
-
1
field :fhirVersion, type: String
-
1
embeds_many :mapping, class_name:'FHIR::StructureDefinition::StructureDefinitionMappingComponent'
-
1
field :kind, type: String
-
1
validates_presence_of :kind
-
1
field :constrainedType, type: String
-
1
field :abstract, type: Boolean
-
1
validates_presence_of :abstract
-
1
field :contextType, type: String
-
1
field :context, type: Array # Array of Strings
-
1
field :base, type: String
-
1
embeds_one :snapshot, class_name:'FHIR::StructureDefinition::StructureDefinitionSnapshotComponent'
-
1
embeds_one :differential, class_name:'FHIR::StructureDefinition::StructureDefinitionDifferentialComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Subscription
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Subscription
-
-
1
SEARCH_PARAMS = [
-
'payload',
-
'criteria',
-
'contact',
-
'tag',
-
'type',
-
'url',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
tag: [ 'queued', 'delivered' ],
-
status: [ 'requested', 'active', 'error', 'off' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec channel
-
1
class SubscriptionChannelComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
fhirType: [ 'rest-hook', 'websocket', 'email', 'sms', 'message' ]
-
}
-
-
1
field :fhirType, type: String
-
1
validates_presence_of :fhirType
-
1
field :endpoint, type: String
-
1
field :payload, type: String
-
1
validates_presence_of :payload
-
1
field :header, type: String
-
end
-
-
1
field :criteria, type: String
-
1
validates_presence_of :criteria
-
1
embeds_many :contact, class_name:'FHIR::ContactPoint'
-
1
field :reason, type: String
-
1
validates_presence_of :reason
-
1
field :status, type: String
-
1
validates_presence_of :status
-
1
field :error, type: String
-
1
embeds_one :channel, class_name:'FHIR::Subscription::SubscriptionChannelComponent'
-
1
validates_presence_of :channel
-
1
field :end, type: String
-
1
validates :end, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/ }
-
1
embeds_many :tag, class_name:'FHIR::Coding'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Substance
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Substance
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'container-identifier',
-
'code',
-
'quantity',
-
'substance',
-
'expiry',
-
'category'
-
]
-
-
1
VALID_CODES = {
-
category: [ 'allergen', 'biological', 'body', 'chemical', 'food', 'drug', 'material' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec instance
-
1
class SubstanceInstanceComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
field :expiry, type: String
-
1
validates :expiry, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :quantity, class_name:'FHIR::Quantity'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec ingredient
-
1
class SubstanceIngredientComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :quantity, class_name:'FHIR::Ratio'
-
1
embeds_one :substance, class_name:'FHIR::Reference'
-
1
validates_presence_of :substance
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
embeds_many :category, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
validates_presence_of :code
-
1
field :description, type: String
-
1
embeds_many :instance, class_name:'FHIR::Substance::SubstanceInstanceComponent'
-
1
embeds_many :ingredient, class_name:'FHIR::Substance::SubstanceIngredientComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class SupplyDelivery
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::SupplyDelivery
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'receiver',
-
'patient',
-
'supplier',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
fhirType: [ 'medication', 'device' ],
-
status: [ 'in-progress', 'completed', 'abandoned' ]
-
}
-
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
field :status, type: String
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
embeds_one :fhirType, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :quantity, class_name:'FHIR::Quantity'
-
1
embeds_one :suppliedItem, class_name:'FHIR::Reference'
-
1
embeds_one :supplier, class_name:'FHIR::Reference'
-
1
embeds_one :whenPrepared, class_name:'FHIR::Period'
-
1
field :time, type: String
-
1
validates :time, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :destination, class_name:'FHIR::Reference'
-
1
embeds_many :receiver, class_name:'FHIR::Reference'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class SupplyRequest
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::SupplyRequest
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'identifier',
-
'kind',
-
'patient',
-
'supplier',
-
'source',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
kind: [ 'central', 'nonstock' ],
-
status: [ 'requested', 'completed', 'failed', 'cancelled' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
reason: [ 'reasonCodeableConcept', 'reasonReference' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec when
-
1
class SupplyRequestWhenComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :schedule, class_name:'FHIR::Timing'
-
end
-
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
embeds_one :source, class_name:'FHIR::Reference'
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
field :status, type: String
-
1
embeds_one :kind, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :orderedItem, class_name:'FHIR::Reference'
-
1
embeds_many :supplier, class_name:'FHIR::Reference'
-
1
embeds_one :reasonCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :reasonReference, class_name:'FHIR::Reference'
-
1
embeds_one :when, class_name:'FHIR::SupplyRequest::SupplyRequestWhenComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class TestScript
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::TestScript
-
-
1
SEARCH_PARAMS = [
-
'identifier',
-
'testscript-test-capability',
-
'testscript-setup-capability',
-
'name',
-
'description',
-
'testscript-capability',
-
'url'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'draft', 'active', 'retired' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec contact
-
1
class TestScriptContactComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :name, type: String
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec link
-
1
class TestScriptMetadataLinkComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :url, type: String
-
1
validates_presence_of :url
-
1
field :description, type: String
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec capability
-
1
class TestScriptMetadataCapabilityComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :required, type: Boolean
-
1
field :fhirValidated, type: Boolean
-
1
field :description, type: String
-
1
field :destination, type: Integer
-
1
field :link, type: Array # Array of Strings
-
1
embeds_one :conformance, class_name:'FHIR::Reference'
-
1
validates_presence_of :conformance
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec metadata
-
1
class TestScriptMetadataComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_many :link, class_name:'FHIR::TestScript::TestScriptMetadataLinkComponent'
-
1
embeds_many :capability, class_name:'FHIR::TestScript::TestScriptMetadataCapabilityComponent'
-
1
validates_presence_of :capability
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec fixture
-
1
class TestScriptFixtureComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :autocreate, type: Boolean
-
1
field :autodelete, type: Boolean
-
1
embeds_one :resource, class_name:'FHIR::Reference'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec variable
-
1
class TestScriptVariableComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :name, type: String
-
1
validates_presence_of :name
-
1
field :headerField, type: String
-
1
field :path, type: String
-
1
field :sourceId, type: String
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec requestHeader
-
1
class TestScriptSetupActionOperationRequestHeaderComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :field, type: String
-
1
validates_presence_of :field
-
1
field :value, type: String
-
1
validates_presence_of :value
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec operation
-
1
class TestScriptSetupActionOperationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
contentType: [ 'xml', 'json' ],
-
fhirType: [ 'read', 'vread', 'update', 'delete', 'history', 'create', 'search', 'transaction', 'conformance', 'closure', 'document', 'everything', 'expand', 'find', 'lookup', 'meta', 'meta-add', 'meta-delete', 'populate', 'process-message', 'questionnaire', 'translate', 'validate', 'validate-code' ],
-
accept: [ 'xml', 'json' ]
-
}
-
-
1
embeds_one :fhirType, class_name:'FHIR::Coding'
-
1
field :resource, type: String
-
1
field :label, type: String
-
1
field :description, type: String
-
1
field :accept, type: String
-
1
field :contentType, type: String
-
1
field :destination, type: Integer
-
1
field :encodeRequestUrl, type: Boolean
-
1
field :params, type: String
-
1
embeds_many :requestHeader, class_name:'FHIR::TestScript::TestScriptSetupActionOperationRequestHeaderComponent'
-
1
field :responseId, type: String
-
1
field :sourceId, type: String
-
1
field :targetId, type: String
-
1
field :url, type: String
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec assert
-
1
class TestScriptSetupActionAssertComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
response: [ 'okay', 'created', 'noContent', 'notModified', 'bad', 'forbidden', 'notFound', 'methodNotAllowed', 'conflict', 'gone', 'preconditionFailed', 'unprocessable' ],
-
contentType: [ 'xml', 'json' ],
-
operator: [ 'equals', 'notEquals', 'in', 'notIn', 'greaterThan', 'lessThan', 'empty', 'notEmpty', 'contains', 'notContains' ],
-
direction: [ 'response', 'request' ]
-
}
-
-
1
field :label, type: String
-
1
field :description, type: String
-
1
field :direction, type: String
-
1
field :compareToSourceId, type: String
-
1
field :compareToSourcePath, type: String
-
1
field :contentType, type: String
-
1
field :headerField, type: String
-
1
field :minimumId, type: String
-
1
field :navigationLinks, type: Boolean
-
1
field :operator, type: String
-
1
field :path, type: String
-
1
field :resource, type: String
-
1
field :response, type: String
-
1
field :responseCode, type: String
-
1
field :sourceId, type: String
-
1
field :validateProfileId, type: String
-
1
field :value, type: String
-
1
field :warningOnly, type: Boolean
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec action
-
1
class TestScriptSetupActionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :operation, class_name:'FHIR::TestScript::TestScriptSetupActionOperationComponent'
-
1
embeds_one :assert, class_name:'FHIR::TestScript::TestScriptSetupActionAssertComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec setup
-
1
class TestScriptSetupComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :metadata, class_name:'FHIR::TestScript::TestScriptMetadataComponent'
-
1
embeds_many :action, class_name:'FHIR::TestScript::TestScriptSetupActionComponent'
-
1
validates_presence_of :action
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec action
-
1
class TestScriptTestActionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :operation, class_name:'FHIR::TestScript::TestScriptSetupActionOperationComponent'
-
1
embeds_one :assert, class_name:'FHIR::TestScript::TestScriptSetupActionAssertComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec test
-
1
class TestScriptTestComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :name, type: String
-
1
field :description, type: String
-
1
embeds_one :metadata, class_name:'FHIR::TestScript::TestScriptMetadataComponent'
-
1
embeds_many :action, class_name:'FHIR::TestScript::TestScriptTestActionComponent'
-
1
validates_presence_of :action
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec action
-
1
class TestScriptTeardownActionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_one :operation, class_name:'FHIR::TestScript::TestScriptSetupActionOperationComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec teardown
-
1
class TestScriptTeardownComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
embeds_many :action, class_name:'FHIR::TestScript::TestScriptTeardownActionComponent'
-
1
validates_presence_of :action
-
end
-
-
1
field :url, type: String
-
1
validates_presence_of :url
-
1
field :versionNum, type: String
-
1
field :name, type: String
-
1
validates_presence_of :name
-
1
field :status, type: String
-
1
validates :status, :inclusion => { in: VALID_CODES[:status] }
-
1
validates_presence_of :status
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
field :experimental, type: Boolean
-
1
field :publisher, type: String
-
1
embeds_many :contact, class_name:'FHIR::TestScript::TestScriptContactComponent'
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :description, type: String
-
1
embeds_many :useContext, class_name:'FHIR::CodeableConcept'
-
1
field :requirements, type: String
-
1
field :copyright, type: String
-
1
embeds_one :metadata, class_name:'FHIR::TestScript::TestScriptMetadataComponent'
-
1
field :multiserver, type: Boolean
-
1
embeds_many :fixture, class_name:'FHIR::TestScript::TestScriptFixtureComponent'
-
1
embeds_many :profile, class_name:'FHIR::Reference'
-
1
embeds_many :variable, class_name:'FHIR::TestScript::TestScriptVariableComponent'
-
1
embeds_one :setup, class_name:'FHIR::TestScript::TestScriptSetupComponent'
-
1
embeds_many :test, class_name:'FHIR::TestScript::TestScriptTestComponent'
-
1
embeds_one :teardown, class_name:'FHIR::TestScript::TestScriptTeardownComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class Timing
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::Timing
-
-
-
1
VALID_CODES = {
-
code: [ 'QD', 'QOD', 'Q4H', 'Q6H', 'BID', 'TID', 'QID', 'AM', 'PM' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec repeat
-
1
class TimingRepeatComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
periodUnits: [ 's', 'min', 'h', 'd', 'wk', 'mo', 'a' ],
-
durationUnits: [ 's', 'min', 'h', 'd', 'wk', 'mo', 'a' ],
-
when: [ 'HS', 'WAKE', 'C', 'CM', 'CD', 'CV', 'AC', 'ACM', 'ACD', 'ACV', 'PC', 'PCM', 'PCD', 'PCV' ]
-
}
-
-
1
MULTIPLE_TYPES = {
-
bounds: [ 'boundsQuantity', 'boundsRange', 'boundsPeriod' ]
-
}
-
-
1
embeds_one :boundsQuantity, class_name:'FHIR::Quantity'
-
1
embeds_one :boundsRange, class_name:'FHIR::Range'
-
1
embeds_one :boundsPeriod, class_name:'FHIR::Period'
-
1
field :count, type: Integer
-
1
field :duration, type: Float
-
1
field :durationMax, type: Float
-
1
field :durationUnits, type: String
-
1
field :frequency, type: Integer
-
1
field :frequencyMax, type: Integer
-
1
field :period, type: Float
-
1
field :periodMax, type: Float
-
1
field :periodUnits, type: String
-
1
field :when, type: String
-
end
-
-
1
field :event, type: Array # Array of Strings
-
1
validates_each :event, allow_nil: true do |record, attr, values|
-
values.each do |value|
-
record.errors.add(attr, "#{value} is not a valid datetime.") if value.match(/\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/).nil?
-
end
-
end
-
1
embeds_one :repeat, class_name:'FHIR::Timing::TimingRepeatComponent'
-
1
embeds_one :code, class_name:'FHIR::CodeableConcept'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class ValueSet
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::ValueSet
-
-
1
SEARCH_PARAMS = [
-
'date',
-
'identifier',
-
'code',
-
'description',
-
'version',
-
'url',
-
'expansion',
-
'reference',
-
'system',
-
'name',
-
'context',
-
'publisher',
-
'status'
-
]
-
-
1
VALID_CODES = {
-
status: [ 'draft', 'active', 'retired' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec contact
-
1
class ValueSetContactComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :name, type: String
-
1
embeds_many :telecom, class_name:'FHIR::ContactPoint'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec designation
-
1
class ConceptDefinitionDesignationComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :language, type: String
-
1
embeds_one :use, class_name:'FHIR::Coding'
-
1
field :value, type: String
-
1
validates_presence_of :value
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec concept
-
1
class ConceptDefinitionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :code, type: String
-
1
validates_presence_of :code
-
1
field :abstract, type: Boolean
-
1
field :display, type: String
-
1
field :definition, type: String
-
1
embeds_many :designation, class_name:'FHIR::ValueSet::ConceptDefinitionDesignationComponent'
-
1
embeds_many :concept, class_name:'FHIR::ValueSet::ConceptDefinitionComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec codeSystem
-
1
class ValueSetCodeSystemComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :system, type: String
-
1
validates_presence_of :system
-
1
field :versionNum, type: String
-
1
field :caseSensitive, type: Boolean
-
1
embeds_many :concept, class_name:'FHIR::ValueSet::ConceptDefinitionComponent'
-
1
validates_presence_of :concept
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec concept
-
1
class ConceptReferenceComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :code, type: String
-
1
validates_presence_of :code
-
1
field :display, type: String
-
1
embeds_many :designation, class_name:'FHIR::ValueSet::ConceptDefinitionDesignationComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec filter
-
1
class ConceptSetFilterComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
op: [ '=', 'is-a', 'is-not-a', 'regex', 'in', 'not-in' ]
-
}
-
-
1
field :property, type: String
-
1
validates_presence_of :property
-
1
field :op, type: String
-
1
validates_presence_of :op
-
1
field :value, type: String
-
1
validates_presence_of :value
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec include
-
1
class ConceptSetComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :system, type: String
-
1
validates_presence_of :system
-
1
field :versionNum, type: String
-
1
embeds_many :concept, class_name:'FHIR::ValueSet::ConceptReferenceComponent'
-
1
embeds_many :filter, class_name:'FHIR::ValueSet::ConceptSetFilterComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec compose
-
1
class ValueSetComposeComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :import, type: Array # Array of Strings
-
1
embeds_many :include, class_name:'FHIR::ValueSet::ConceptSetComponent'
-
1
embeds_many :exclude, class_name:'FHIR::ValueSet::ConceptSetComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec parameter
-
1
class ValueSetExpansionParameterComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
MULTIPLE_TYPES = {
-
value: [ 'valueString', 'valueBoolean', 'valueInteger', 'valueDecimal', 'valueUri', 'valueCode' ]
-
}
-
-
1
field :name, type: String
-
1
validates_presence_of :name
-
1
field :valueString, type: String
-
1
field :valueBoolean, type: Boolean
-
1
field :valueInteger, type: Integer
-
1
field :valueDecimal, type: Float
-
1
field :valueUri, type: String
-
1
field :valueCode, type: String
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec contains
-
1
class ValueSetExpansionContainsComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :system, type: String
-
1
field :abstract, type: Boolean
-
1
field :versionNum, type: String
-
1
field :code, type: String
-
1
field :display, type: String
-
1
embeds_many :contains, class_name:'FHIR::ValueSet::ValueSetExpansionContainsComponent'
-
end
-
-
# This is an ugly hack to deal with embedded structures in the spec expansion
-
1
class ValueSetExpansionComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
1
field :identifier, type: String
-
1
validates_presence_of :identifier
-
1
field :timestamp, type: String
-
1
validates :timestamp, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
validates_presence_of :timestamp
-
1
field :total, type: Integer
-
1
field :offset, type: Integer
-
1
embeds_many :parameter, class_name:'FHIR::ValueSet::ValueSetExpansionParameterComponent'
-
1
embeds_many :contains, class_name:'FHIR::ValueSet::ValueSetExpansionContainsComponent'
-
end
-
-
1
field :url, type: String
-
1
embeds_one :identifier, class_name:'FHIR::Identifier'
-
1
field :versionNum, type: String
-
1
field :name, type: String
-
1
field :status, type: String
-
1
validates :status, :inclusion => { in: VALID_CODES[:status] }
-
1
validates_presence_of :status
-
1
field :experimental, type: Boolean
-
1
field :publisher, type: String
-
1
embeds_many :contact, class_name:'FHIR::ValueSet::ValueSetContactComponent'
-
1
field :date, type: String
-
1
validates :date, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
field :lockedDate, type: String
-
1
validates :lockedDate, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/ }
-
1
field :description, type: String
-
1
embeds_many :useContext, class_name:'FHIR::CodeableConcept'
-
1
field :immutable, type: Boolean
-
1
field :requirements, type: String
-
1
field :copyright, type: String
-
1
field :extensible, type: Boolean
-
1
embeds_one :codeSystem, class_name:'FHIR::ValueSet::ValueSetCodeSystemComponent'
-
1
embeds_one :compose, class_name:'FHIR::ValueSet::ValueSetComposeComponent'
-
1
embeds_one :expansion, class_name:'FHIR::ValueSet::ValueSetExpansionComponent'
-
1
track_history
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class VisionPrescription
-
-
1
include Mongoid::Document
-
1
include Mongoid::History::Trackable
-
1
include FHIR::Element
-
1
include FHIR::Resource
-
1
include FHIR::Formats::Utilities
-
1
include FHIR::Serializer::Utilities
-
1
extend FHIR::Deserializer::VisionPrescription
-
-
1
SEARCH_PARAMS = [
-
'prescriber',
-
'identifier',
-
'patient',
-
'datewritten',
-
'encounter'
-
]
-
1
MULTIPLE_TYPES = {
-
reason: [ 'reasonCodeableConcept', 'reasonReference' ]
-
}
-
-
# This is an ugly hack to deal with embedded structures in the spec dispense
-
1
class VisionPrescriptionDispenseComponent
-
1
include Mongoid::Document
-
1
include FHIR::Element
-
1
include FHIR::Formats::Utilities
-
-
1
VALID_CODES = {
-
eye: [ 'right', 'left' ],
-
product: [ 'lens', 'contact' ],
-
base: [ 'up', 'down', 'in', 'out' ]
-
}
-
-
1
embeds_one :product, class_name:'FHIR::Coding'
-
1
validates_presence_of :product
-
1
field :eye, type: String
-
1
field :sphere, type: Float
-
1
field :cylinder, type: Float
-
1
field :axis, type: Integer
-
1
field :prism, type: Float
-
1
field :base, type: String
-
1
field :add, type: Float
-
1
field :power, type: Float
-
1
field :backCurve, type: Float
-
1
field :diameter, type: Float
-
1
embeds_one :duration, class_name:'FHIR::Quantity'
-
1
field :color, type: String
-
1
field :brand, type: String
-
1
field :notes, type: String
-
end
-
-
1
embeds_many :identifier, class_name:'FHIR::Identifier'
-
1
field :dateWritten, type: String
-
1
validates :dateWritten, :allow_nil => true, :format => { with: /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/ }
-
1
embeds_one :patient, class_name:'FHIR::Reference'
-
1
embeds_one :prescriber, class_name:'FHIR::Reference'
-
1
embeds_one :encounter, class_name:'FHIR::Reference'
-
1
embeds_one :reasonCodeableConcept, class_name:'FHIR::CodeableConcept'
-
1
embeds_one :reasonReference, class_name:'FHIR::Reference'
-
1
embeds_many :dispense, class_name:'FHIR::VisionPrescription::VisionPrescriptionDispenseComponent'
-
1
track_history
-
end
-
end
-
# app/models/history_tracker.rb
-
1
class HistoryTracker
-
1
include Mongoid::History::Tracker
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class StructureDefinition
-
-
1
attr_accessor :finding
-
1
attr_accessor :errors
-
1
attr_accessor :warnings
-
1
cattr_accessor :base_definitions
-
-
1
@@base_definitions = nil
-
1
@@other_definitions = nil
-
1
@@type_definitions = nil
-
1
@@extension_definitions = nil
-
-
1
def self.load_definitions
-
15588
if @@base_definitions.nil?
-
1
filename = File.join(File.dirname(__FILE__),'profiles-resources.xml')
-
1
xml = File.read(filename)
-
1
@@base_definitions = FHIR::Bundle.from_xml(xml)
-
end
-
15588
if @@other_definitions.nil?
-
1
filename = File.join(File.dirname(__FILE__),'profiles-others.xml')
-
1
xml = File.read(filename)
-
1
@@other_definitions = FHIR::Bundle.from_xml(xml)
-
end
-
15588
if @@type_definitions.nil?
-
1
filename = File.join(File.dirname(__FILE__),'profiles-types.xml')
-
1
xml = File.read(filename)
-
1
@@type_definitions = FHIR::Bundle.from_xml(xml)
-
end
-
15588
if @@extension_definitions.nil?
-
1
filename = File.join(File.dirname(__FILE__),'extension-definitions.xml')
-
1
xml = File.read(filename)
-
1
@@extension_definitions = FHIR::Bundle.from_xml(xml)
-
end
-
end
-
-
1
def self.get_base_definition(resource_name)
-
4337
return nil if resource_name.nil?
-
4337
load_definitions
-
-
4337
@@base_definitions.entry.each do |entry|
-
480528
if entry.resourceType == 'StructureDefinition'
-
396660
if !entry.resource.nil? && (entry.resource.xmlId == resource_name || entry.resource.name == resource_name || entry.resource.url == resource_name)
-
442
return entry.resource
-
end
-
end
-
end
-
-
nil
-
end
-
-
1
def self.get_profiles_for_resource(resource_name)
-
96
results = []
-
96
definition = FHIR::StructureDefinition.get_base_definition(resource_name)
-
96
if !definition.nil?
-
96
@@other_definitions.entry.each do |entry|
-
10944
if entry.resourceType == 'StructureDefinition'
-
10944
if !entry.resource.nil? && entry.resource.base==definition.url
-
112
results << entry.resource
-
end
-
end
-
end
-
end
-
96
results
-
end
-
-
1
def self.get_other_definition(definition_name)
-
return nil if definition_name.nil?
-
load_definitions
-
@@other_definitions.entry.each do |entry|
-
if entry.resourceType == 'StructureDefinition'
-
if !entry.resource.nil? && (entry.resource.xmlId == definition_name || entry.resource.name == definition_name || entry.resource.url == definition_name)
-
return entry.resource
-
end
-
end
-
end
-
nil
-
end
-
-
1
def self.get_type_definition(type_name)
-
11250
return nil if type_name.nil?
-
11250
load_definitions
-
11250
@@type_definitions.entry.each do |entry|
-
330688
if entry.resourceType == 'StructureDefinition'
-
330688
if !entry.resource.nil? && (entry.resource.xmlId == type_name || entry.resource.name == type_name)
-
11250
return entry.resource
-
end
-
end
-
end
-
nil
-
end
-
-
1
def self.get_extension_definition(extension_name)
-
return nil if extension_name.nil?
-
load_definitions
-
@@extension_definitions.entry.each do |entry|
-
if entry.resourceType == 'StructureDefinition'
-
if !entry.resource.nil? && (entry.resource.xmlId == extension_name || entry.resource.url == extension_name)
-
return entry.resource
-
end
-
end
-
end
-
nil
-
end
-
-
1
def self.find_all_flaws
-
load_definitions
-
all_flaws = []
-
begin
-
@@other_definitions.entry.each do |entry|
-
if entry.resourceType == 'StructureDefinition'
-
if !entry.resource.nil?
-
base = get_base_definition(entry.resource.base)
-
if base.nil? || base.snapshot.nil?
-
puts "Skipping #{entry.resource.xmlId} with base #{entry.resource.base}"
-
next
-
end
-
base_elements = base.snapshot.element.map {|e| e.path}
-
profile_elements = entry.resource.snapshot.element.map {|e| e.path }
-
missing = base_elements - profile_elements
-
if !missing.nil?
-
missing.each do |m|
-
all_flaws << "#{entry.resource.xmlId} is missing #{m} from #{base.xmlId}"
-
end
-
end
-
end
-
end
-
end
-
rescue Exception => ex
-
binding.pry
-
end
-
all_flaws
-
end
-
-
# -------------------------------------------------------------------------
-
# Profile Comparison
-
# -------------------------------------------------------------------------
-
-
# Checks whether or not "another_definition" is compatible with this definition.
-
# If they have conflicting elements, restrictions, bindings, modifying extensions, etc.
-
1
def is_compatible?(another_definition)
-
@errors = []
-
@warnings = []
-
-
@finding = FHIR::StructureDefinitionFinding.new
-
@finding.resourceType = snapshot.element[0].path
-
@finding.profileIdA = xmlId
-
@finding.profileIdB = another_definition.xmlId if another_definition.respond_to?(:xmlId)
-
-
if !(another_definition.is_a? FHIR::StructureDefinition)
-
@errors << @finding.error('','','Not a StructureDefinition','StructureDefinition',"#{another_definition.class.name}")
-
return false
-
elsif another_definition.snapshot.element[0].path!=snapshot.element[0].path
-
@errors << @finding.error('','','Incompatible resourceType',@finding.resourceType, "#{another_definition.snapshot.element[0].path}")
-
return false
-
end
-
-
left_elements = Array.new(snapshot.element)
-
right_elements = Array.new(another_definition.snapshot.element)
-
-
left_paths = left_elements.map { |e| e.path }
-
right_paths = right_elements.map { |e| e.path }
-
-
# StructureDefinitions don't always include all base attributes (for example, of a ContactPoint)
-
# if nothing is modified from the base definition, so we have to add them in if they are missing.
-
base_definition = FHIR::StructureDefinition.get_base_definition(snapshot.element[0].path)
-
base_elements = base_definition.snapshot.element
-
-
left_missing = right_paths - left_paths
-
# left_missing_roots = left_missing.map{|e| e.split('.')[0..-2].join('.') }.uniq
-
add_missing_elements(xmlId,left_missing,left_elements,base_elements)
-
-
right_missing = left_paths - right_paths
-
# right_missing_roots = right_missing.map{|e| e.split('.')[0..-2].join('.') }.uniq
-
add_missing_elements(another_definition.xmlId,right_missing,right_elements,base_elements)
-
-
# update paths
-
left_paths = left_elements.map { |e| e.path }
-
right_paths = right_elements.map { |e| e.path }
-
-
# recalculate the missing attributes
-
left_missing = right_paths - left_paths
-
right_missing = left_paths - right_paths
-
-
# generate warnings for missing fields (ignoring extensions)
-
left_missing.each do |e|
-
if !e.include? 'extension'
-
elem = get_element_by_path(e,right_elements)
-
if !elem.min.nil? && elem.min > 0
-
@errors << @finding.error(e,'min','Missing REQUIRED element','Missing',"#{elem.min}")
-
elsif elem.isModifier==true
-
@errors << @finding.error(e,'isModifier','Missing MODIFIER element','Missing',"#{elem.isModifier}")
-
else
-
@warnings << @finding.warning(e,'','Missing element','Missing','Defined')
-
end
-
end
-
end
-
right_missing.each do |e|
-
if !e.include? 'extension'
-
elem = get_element_by_path(e,left_elements)
-
if !elem.min.nil? && elem.min > 0
-
@errors << @finding.error(e,'min','Missing REQUIRED element',"#{elem.min}",'Missing')
-
elsif elem.isModifier==true
-
@errors << @finding.error(e,'isModifier','Missing MODIFIER element',"#{elem.isModifier}",'Missing')
-
else
-
@warnings << @finding.warning(e,'','Missing element','Defined','Missing')
-
end
-
end
-
end
-
-
left_extensions = []
-
right_extensions = []
-
-
# compare elements, starting with the elements in this definition
-
left_elements.each do |x|
-
if x.path.include? 'extension'
-
# handle extensions separately
-
left_extensions << x
-
else
-
y = get_element_by_path(x.path,right_elements)
-
compare_element_definitions(x,y,another_definition)
-
end
-
end
-
-
# now compare elements defined in the other definition, if we haven't already looked at them
-
right_elements.each do |y|
-
if y.path.include? 'extension'
-
# handle extensions separately
-
right_extensions << y
-
elsif left_missing.include? y.path
-
x = get_element_by_path(y.path,left_elements)
-
compare_element_definitions(x,y,another_definition)
-
end
-
end
-
-
# finally, compare the extensions.
-
checked_extensions = []
-
left_extensions.each do |x|
-
y = get_extension(x.name,right_extensions)
-
if !y.nil?
-
# both profiles share an extension with the same name
-
checked_extensions << x.name
-
compare_extension_definition(x,y,another_definition)
-
end
-
y = nil
-
y = get_extension(x.fhirType[0].profile,right_extensions)
-
if !y.nil? && x.name!=y.name
-
# both profiles share the same extension definition but with a different name
-
checked_extensions << x.name
-
checked_extensions << y.name
-
compare_element_definitions(x,y,another_definition)
-
end
-
end
-
right_extensions.each do |y|
-
next if checked_extensions.include?(y.name)
-
x = get_extension(y.name,left_extensions)
-
if !x.nil?
-
# both profiles share an extension with the same name
-
checked_extensions << y.name
-
compare_extension_definition(x,y,another_definition)
-
end
-
x = nil
-
x = get_extension(y.fhirType[0].profile,left_extensions)
-
if !x.nil? && x.name!=y.name && !checked_extensions.include?(x.name)
-
# both profiles share the same extension definition but with a different name
-
checked_extensions << x.name
-
checked_extensions << y.name
-
compare_element_definitions(x,y,another_definition)
-
end
-
end
-
@errors.flatten!
-
@warnings.flatten!
-
@errors.size==0
-
end
-
-
1
def get_element_by_path(path,elements=snapshot.element)
-
elements.each do |element|
-
return element if element.path==path
-
end
-
nil
-
end
-
-
1
def get_extension(extension,elements=snapshot.element)
-
elements.each do |element|
-
if element.path.include?('extension') || element.fhirType.map{|t|t.code}.include?('Extension')
-
return element if element.name==extension || element.fhirType.map{|t|t.profile}.include?(extension)
-
end
-
end
-
nil
-
end
-
-
#private
-
# name -- name of the profile we're fixing
-
# missing_paths -- list of paths that we're adding
-
# elements -- list of elements currently defined in the profile
-
# base_elements -- list of elements defined in the base resource the profile extends
-
1
def add_missing_elements(name,missing_paths,elements,base_elements)
-
variable_paths = elements.map{|e|e.path}.grep(/\[x\]/).map{|e|e[0..-4]}
-
variable_paths << base_elements.map{|e|e.path}.grep(/\[x\]/).map{|e|e[0..-4]}
-
variable_paths.flatten!.uniq!
-
-
missing_paths.each do |path|
-
# Skip extensions
-
next if path.include? 'extension'
-
-
# Skip the variable paths that end with "[x]"
-
next if variable_paths.any?{|variable| path.starts_with?(variable)}
-
-
elem = get_element_by_path(path,base_elements)
-
if !elem.nil?
-
# _DEEP_ copy
-
elements << FHIR::ElementDefinition.from_fhir_json(elem.to_fhir_json)
-
next
-
end
-
-
x = path.split('.')
-
root = x.first(x.size-1).join('.')
-
if root.include? '.'
-
# get the root element to fill in the details
-
elem = get_element_by_path(root,elements)
-
# get the data type definition to fill in the details
-
# assume missing elements are from first data type (gross)
-
next if elem.fhirType.nil? || elem.fhirType.empty?
-
type_def = FHIR::StructureDefinition.get_type_definition(elem.fhirType[0].code)
-
next if type_def.nil?
-
type_elements = Array.new(type_def.snapshot.element)
-
# _DEEP_ copy
-
type_elements.map! do |e| #{|e| FHIR::ElementDefinition.from_fhir_json(e.to_fhir_json) }
-
FHIR::ElementDefinition.from_fhir_json(e.to_fhir_json)
-
end
-
# Fix path names
-
type_root = String.new(type_elements[0].path)
-
type_elements.each { |e| e.path.gsub!(type_root,root) }
-
# finally, add the missing element definitions
-
# one by one -- only if they are not already present (i.e. do not override)
-
type_elements.each do |x|
-
y = get_element_by_path(x.path,elements)
-
if y.nil?
-
elements << x
-
# else
-
# @warnings << "StructureDefinition #{name} already contains #{x.path}"
-
end
-
end
-
elements.uniq!
-
# else
-
# binding.pry
-
# @warnings << "StructureDefinition #{name} missing -- #{path}"
-
end
-
end
-
end
-
-
#private
-
1
def compare_extension_definition(x,y,another_definition)
-
x_profiles = x.fhirType.map{|t|t.profile}
-
y_profiles = y.fhirType.map{|t|t.profile}
-
x_only = x_profiles - y_profiles
-
y_only = y_profiles - x_profiles
-
shared = x_profiles - x_only
-
-
if !shared.nil? && shared.size==0
-
# same name, but different profiles
-
# maybe the profiles are the same, just with different URLs...
-
# ... so we have to compare them, if we can.
-
@warnings << @finding.warning("#{x.path} (#{x.name})",'type.profile','Different Profiles',"#{x_profiles}","#{y_profiles}")
-
x_extension = FHIR::StructureDefinition.get_extension_definition(x.fhirType[0].profile)
-
y_extension = FHIR::StructureDefinition.get_extension_definition(y.fhirType[0].profile)
-
if !x_extension.nil? && !y_extension.nil?
-
x_extension.is_compatible?(y_extension)
-
@errors << x_extension.errors
-
@warnings << x_extension.warnings
-
else
-
@warnings << @finding.warning("#{x.path} (#{x.name})",'','Could not find extension definitions to compare.','','')
-
end
-
else
-
compare_element_definitions(x,y,another_definition)
-
end
-
end
-
-
#private
-
1
def compare_element_definitions(x,y,another_definition)
-
return if x.nil? || y.nil? || another_definition.nil?
-
-
# check cardinality
-
x_min = x.min || 0
-
x_max = (x.max == '*') ? Float::INFINITY : x.max.to_i
-
y_min = y.min || 0
-
y_max = (y.max == '*') ? Float::INFINITY : y.max.to_i
-
-
if x_min.nil? || x.max.nil? || y_min.nil? || y.max.nil?
-
@errors << @finding.error("#{x.path}",'min/max','Unknown cardinality',"#{x_min}..#{x.max}","#{y_min}..#{y.max}")
-
elsif (x_min > y_max) || (x_max < y_min)
-
@errors << @finding.error("#{x.path}",'min/max','Incompatible cardinality',"#{x_min}..#{x.max}","#{y_min}..#{y.max}")
-
elsif (x_min != y_min) || (x_max != y_max)
-
@warnings << @finding.warning("#{x.path}",'min/max','Inconsistent cardinality',"#{x_min}..#{x.max}","#{y_min}..#{y.max}")
-
end
-
-
# check data types
-
x_types = x.fhirType.map {|t| t.code }
-
y_types = y.fhirType.map {|t| t.code }
-
x_only = x_types - y_types
-
y_only = y_types - x_types
-
shared = x_types - x_only
-
-
if !shared.nil? && shared.size==0 && x_types.size>0 && y_types.size>0 && x.constraint.size > 0 && y.constraint.size > 0
-
@errors << @finding.error("#{x.path}",'type.code','Incompatible data types',"#{x_types}","#{y_types}")
-
end
-
if !x_only.nil? && x_only.size > 0
-
@warnings << @finding.warning("#{x.path}",'type.code','Allows additional data types',"#{x_only}","not allowed")
-
end
-
if !y_only.nil? && y_only.size > 0
-
@warnings << @finding.warning("#{x.path}",'type.code','Allows additional data types','not allowed',"#{y_only}")
-
end
-
-
# check bindings
-
if x.binding.nil? && !y.binding.nil?
-
val = y.binding.valueSetUri || y.binding.valueSetReference.try(:reference) || y.binding.description
-
@warnings << @finding.warning("#{x.path}",'binding','Inconsistent binding','',val)
-
elsif !x.binding.nil? && y.binding.nil?
-
val = x.binding.valueSetUri || x.binding.valueSetReference.try(:reference) || x.binding.description
-
@warnings << @finding.warning("#{x.path}",'binding','Inconsistent binding',val,'')
-
elsif !x.binding.nil? && !y.binding.nil?
-
x_vs = x.binding.valueSetUri || x.binding.valueSetReference.try(:reference)
-
y_vs = y.binding.valueSetUri || y.binding.valueSetReference.try(:reference)
-
if x_vs != y_vs
-
if x.binding.strength=='required' || y.binding.strength=='required'
-
@errors << @finding.error("#{x.path}",'binding.strength','Incompatible bindings',"#{x.binding.strength} #{x_vs}","#{y.binding.strength} #{y_vs}")
-
else
-
@warnings << @finding.warning("#{x.path}",'binding.strength','Inconsistent bindings',"#{x.binding.strength} #{x_vs}","#{y.binding.strength} #{y_vs}")
-
end
-
end
-
end
-
-
# check default values
-
if x.defaultValue.try(:type) != y.defaultValue.try(:type)
-
@errors << @finding.error("#{x.path}",'defaultValue','Incompatible default type',"#{x.defaultValue.try(:type)}","#{y.defaultValue.try(:type)}")
-
end
-
if x.defaultValue.try(:value) != y.defaultValue.try(:value)
-
@errors << @finding.error("#{x.path}",'defaultValue','Incompatible default value',"#{x.defaultValue.try(:value)}","#{y.defaultValue.try(:value)}")
-
end
-
-
# check meaning when missing
-
if x.meaningWhenMissing != y.meaningWhenMissing
-
@errors << @finding.error("#{x.path}",'meaningWhenMissing','Inconsistent missing meaning',"#{x.meaningWhenMissing.gsub(',',';')}","#{y.meaningWhenMissing.gsub(',',';')}")
-
end
-
-
# check fixed values
-
if x.fixed.try(:type) != y.fixed.try(:type)
-
@errors << @finding.error("#{x.path}",'fixed','Incompatible fixed type',"#{x.fixed.try(:type)}","#{y.fixed.try(:type)}")
-
end
-
if x.fixed != y.fixed
-
xfv = ''
-
yfv = ''
-
xfv = x.fixed.try(:value)
-
xfv = xfv.to_xml.gsub(/\n/,'') if x.fixed.try(:value).methods.include?(:to_xml)
-
yfv = y.fixed.try(:value)
-
yfv = yfv.to_xml.gsub(/\n/,'') if y.fixed.try(:value).methods.include?(:to_xml)
-
@errors << @finding.error("#{x.path}",'fixed','Incompatible fixed value',"#{xfv}","#{yfv}")
-
end
-
-
# check min values
-
if x.min.try(:type) != y.min.try(:type)
-
@errors << @finding.error("#{x.path}",'min','Incompatible min type',"#{x.min.try(:type)}","#{y.min.try(:type)}")
-
end
-
if x.min.try(:value) != y.min.try(:value)
-
@errors << @finding.error("#{x.path}",'min','Incompatible min value',"#{x.min.try(:value)}","#{y.min.try(:value)}")
-
end
-
-
# check max values
-
if x.max.try(:type) != y.max.try(:type)
-
@errors << @finding.error("#{x.path}",'max','Incompatible max type',"#{x.max.try(:type)}","#{y.max.try(:type)}")
-
end
-
if x.max.try(:value) != y.max.try(:value)
-
@errors << @finding.error("#{x.path}",'max','Incompatible max value',"#{x.max.try(:value)}","#{y.max.try(:value)}")
-
end
-
-
# check pattern values
-
if x.pattern.try(:type) != y.pattern.try(:type)
-
@errors << @finding.error("#{x.path}",'pattern','Incompatible pattern type',"#{x.pattern.try(:type)}","#{y.pattern.try(:type)}")
-
end
-
if x.pattern.try(:value) != y.pattern.try(:value)
-
@errors << @finding.error("#{x.path}",'pattern','Incompatible pattern value',"#{x.pattern.try(:value)}","#{y.pattern.try(:value)}")
-
end
-
-
# maxLength (for Strings)
-
if x.maxLength != y.maxLength
-
@warnings << @finding.warning("#{x.path}",'maxLength','Inconsistent maximum length',"#{x.maxLength}","#{y.maxLength}")
-
end
-
-
# constraints
-
x_constraints = x.constraint.map {|t| t.xpath }
-
y_constraints = y.constraint.map {|t| t.xpath }
-
x_only = x_constraints - y_constraints
-
y_only = y_constraints - x_constraints
-
shared = x_constraints - x_only
-
-
if !shared.nil? && shared.size==0 && x.constraint.size > 0 && y.constraint.size > 0
-
@errors << @finding.error("#{x.path}",'constraint.xpath','Incompatible constraints',"#{x_constraints.map{|x|x.gsub(',',';')}.join(' && ')}","#{y_constraints.map{|x|x.gsub(',',';')}.join(' && ')}")
-
end
-
if !x_only.nil? && x_only.size > 0
-
@errors << @finding.error("#{x.path}",'constraint.xpath','Additional constraints',"#{x_constraints.map{|x|x.gsub(',',';')}.join(' && ')}",'')
-
end
-
if !y_only.nil? && y_only.size > 0
-
@errors << @finding.error("#{x.path}",'constraint.xpath','Additional constraints','',"#{y_constraints.map{|x|x.gsub(',',';')}.join(' && ')}")
-
end
-
-
# mustSupports
-
if x.mustSupport != y.mustSupport
-
@warnings << @finding.warning("#{x.path}",'mustSupport','Inconsistent mustSupport',"#{x.mustSupport || false}","#{y.mustSupport || false}")
-
end
-
-
# isModifier
-
if x.isModifier != y.isModifier
-
@errors << @finding.error("#{x.path}",'isModifier','Incompatible isModifier',"#{x.isModifier || false}","#{y.isModifier || false}")
-
end
-
end
-
-
# -------------------------------------------------------------------------
-
# Profile Validation
-
# -------------------------------------------------------------------------
-
-
# Checks whether or not the "resource" is valid according to this definition.
-
# resource == object whose class inherits from FHIR::Resource, or XML, or JSON
-
# representation == one of ['Resource','XML','JSON']
-
1
def is_valid?(resource,representation='Resource')
-
11595
@errors = []
-
11595
@warnings = []
-
11595
if representation.downcase=='resource'
-
if !is_fhir_class?(resource.class.to_s) || resource.class.name.demodulize!=fhirType
-
@errors << "Not a FHIR Resource: #{resource.class.to_s}"
-
return false
-
end
-
is_valid_xml? resource.to_xml
-
11595
elsif representation.downcase=='xml'
-
11595
is_valid_xml? resource
-
elsif representation.downcase=='json'
-
is_valid_json? resource
-
else
-
raise Exception.new "is_valid? unhandled representation: #{representation}"
-
end
-
end
-
-
# Checks whether or not the "xml" is valid according to this definition.
-
# xml == the raw xml for a FHIR resource
-
1
def is_valid_xml?(xml)
-
11595
doc = Nokogiri::XML(xml)
-
11595
if doc.root.nil?
-
@errors << "Not valid xml."
-
return false
-
end
-
11595
doc.root.add_namespace_definition('fhir', 'http://hl7.org/fhir')
-
11595
doc.root.add_namespace_definition('xhtml', 'http://www.w3.org/1999/xhtml')
-
-
11595
resource_type = doc.xpath('/*').first.name
-
-
# Examine each element defined in the definition
-
11595
snapshot.element.each do |element|
-
64330
path = element.path
-
64330
is_attribute = element.representation.include? 'xmlAttr'
-
-
64330
if is_attribute
-
12579
path = path.sub(/(.*)(\.)(.*)/, '\1/@\3')
-
end
-
64330
if path.end_with?('[x]')
-
768
path = path.gsub(name,"#{resource_type}").gsub('.','/')
-
768
path = path.sub(/(.*)(\/)(fhir:)(.*)(\[x\])/,'\1\2*[starts-with(name(),\'\4\')]')
-
else
-
63562
path = path.gsub(name,"fhir:#{resource_type}").gsub('.','/fhir:')
-
end
-
64330
nodes = doc.xpath(path)
-
64330
nodes = doc.xpath(path.gsub('fhir:','')) if nodes.nil? || nodes.size==0
-
-
# Check the cardinality
-
64330
min = element.min
-
64330
max = (element.max == '*') ? Float::INFINITY : element.max.to_i
-
64330
if (nodes.size < min) && (nodes.size > max)
-
@errors << "#{element.path} failed cardinality test (#{min}..#{max}) -- found #{nodes.size}"
-
end
-
-
# Check the datatype for each node, only if the element has one declared
-
64330
if element.fhirType.size > 0
-
58571
nodes.each do |node|
-
22058
matching_type = 0
-
22058
if is_attribute
-
229
value = node.value
-
else
-
21829
value = node['value']
-
end
-
22058
value = node.to_xml if value.nil? # probably an embedded resource like Narrative
-
-
# the element is valid, if it matches at least one of the datatypes
-
22058
temp_messages = []
-
22058
element.fhirType.each do |type|
-
22670
data_type_code = type.code
-
22670
if is_data_type?(data_type_code,value,'XML')
-
22670
matching_type+=1
-
22670
if data_type_code == 'code' # then check the binding
-
2759
if(!element.binding.nil?)
-
1328
matching_type+=check_binding(element,value)
-
end
-
elsif data_type_code=='CodeableConcept' && element.pattern.try(:type)=='CodeableConcept' && !element.pattern.try(:value).nil?
-
# TODO check that the CodeableConcept matches the defined pattern
-
binding.pry
-
elsif data_type_code=='String' && !element.maxLength.nil? && (value.size>element.maxLength)
-
@errors << "#{element.path} exceed maximum length of #{element.maxLength}: #{value}"
-
end
-
else
-
temp_messages << "#{element.path} is not a valid #{data_type_code}: '#{value}'"
-
end
-
end
-
22058
if matching_type<=0
-
1
@errors += temp_messages
-
2
@errors << "#{element.path} did not match one of the valid data types: #{element.fhirType.map{|e|e.code}.to_s}"
-
else
-
22057
@warnings += temp_messages
-
end
-
22058
if !element.fixed.nil? && element!=value
-
@errors << "#{element.path} value of '#{value}' did not match fixed value: #{element.fixed}"
-
end
-
end
-
end
-
-
# check 'constraint.xpath' constraints
-
64330
if !element.constraint.empty?
-
8064
element.constraint.each do |constraint|
-
8874
nodes.each do |node|
-
9430
begin
-
9430
result = node.xpath(constraint.xpath)
-
38
if !result
-
if constraint.severity=='error'
-
@errors << "#{element.path}: failed #{name} invariant rule #{constraint.key}: #{constraint.human}"
-
else
-
@warnings << "#{element.path}: failed #{name} invariant rule #{constraint.key}: #{constraint.human}"
-
end
-
end
-
rescue Exception => exp
-
9392
@warnings << "#{element.path}: invalid XPath 1.0 expression for #{name} invariant rule #{constraint.key}: #{constraint.human}"
-
end
-
end
-
end
-
end
-
-
end
-
-
11595
@errors.size==0
-
end
-
-
# Checks whether or not the "json" is valid according to this definition.
-
# json == the raw json for a FHIR resource
-
1
def is_valid_json?(json)
-
if json.is_a? String
-
begin
-
json = JSON.parse(json)
-
rescue Exception => e
-
@errors << "Failed to parse JSON: #{e.message} %n #{h} %n #{e.backtrace.join("\n")}"
-
return false
-
end
-
end
-
-
resource_type = json['resourceType']
-
baseType = snapshot.element[0].path
-
# if !resource_type.nil?
-
# fhir_class = get_fhir_class_from_resource_type(resource_type)
-
# if fhir_class.nil? or resource_type!=baseType
-
# @errors << "Invalid resourceType '#{resource_type}' or mismatch with '#{baseType}'"
-
# return false
-
# end
-
# end
-
-
snapshot.element.each do |element|
-
path = element.path
-
path = path[(baseType.size+1)..-1] if path.start_with? baseType
-
nodes = get_json_nodes(json,path)
-
-
# Check the cardinality
-
min = element.min
-
max =
-
if element.max == '*'
-
Float::INFINITY
-
else
-
element.max.to_i
-
end
-
if (nodes.size < min) && (nodes.size > max)
-
@errors << "#{element.path} failed cardinality test (#{min}..#{max}) -- found #{nodes.size}"
-
end
-
-
# Check the datatype for each node, only if the element has one declared, and it isn't the root element
-
if element.fhirType.size > 0 && element.path!=xmlId
-
nodes.each do |value|
-
matching_type = 0
-
-
# the element is valid, if it matches at least one of the datatypes
-
temp_messages = []
-
element.fhirType.each do |type|
-
data_type_code = type.code
-
if is_data_type?(data_type_code,value,'JSON')
-
matching_type+=1
-
if data_type_code == 'code' # then check the binding
-
if(!element.binding.nil?)
-
matching_type+=check_binding(element,value)
-
end
-
elsif data_type_code=='CodeableConcept' && element.patternType=='CodeableConcept' && !element.pattern.nil?
-
# TODO check that the CodeableConcept matches the defined pattern
-
binding.pry
-
elsif data_type_code=='String' && !element.maxLength.nil? && (value.size>element.maxLength)
-
@errors << "#{element.path} exceed maximum length of #{element.maxLength}: #{value}"
-
end
-
else
-
temp_messages << "#{element.path} is not a valid #{data_type_code}: '#{value}'"
-
end
-
end
-
if matching_type<=0
-
@errors += temp_messages
-
@errors << "#{element.path} did not match one of the valid data types: #{element.fhirType.map{|e|e.code}.to_s}"
-
else
-
@warnings += temp_messages
-
end
-
if !element.fixed.nil? && element!=value
-
@errors << "#{element.path} value of '#{value}' did not match fixed value: #{element.fixed}"
-
end
-
end
-
end
-
-
# check 'constraint.xpath' constraints
-
if !element.constraint.empty?
-
element.constraint.each do |constraint|
-
@warnings << "#{element.path}: unable to evaluate XPath expression against JSON for #{name} invariant rule #{constraint.key}: #{constraint.human}"
-
end
-
end
-
-
end
-
-
@errors.size==0
-
end
-
-
1
def get_json_nodes(json,path)
-
results = []
-
return [json] if path.nil?
-
steps = path.split('.')
-
steps.each.with_index do |step,index|
-
if json.is_a? Hash
-
json = json[step]
-
elsif json.is_a? Array
-
json.each do |e|
-
results << get_json_nodes(e,steps[index..-1].join('.'))
-
return results.flatten!
-
end
-
else
-
# this thing doesn't exist
-
return results
-
end
-
return results if json.nil?
-
end
-
-
if !json.is_a? Array
-
results << json
-
else
-
results = json
-
end
-
results
-
end
-
-
# data_type_code == a FHIR DataType code (see http://hl7.org/fhir/2015May/datatypes.html)
-
# value == the representation of the value
-
# representation == one of ['Resource','XML','JSON']
-
1
def is_data_type?(data_type_code,value,representation='Resource')
-
# FHIR models covers any base Resources
-
22670
if is_fhir_class? "FHIR::#{data_type_code}"
-
3895
definition = FHIR::StructureDefinition.get_base_definition(data_type_code)
-
3895
if !definition.nil?
-
retVal = definition.is_valid?(value,representation)
-
if !retVal
-
@errors += definition.errors
-
@warnings += definition.warnings
-
end
-
return retVal
-
end
-
end
-
-
# Remaining data types: handle special cases before checking type StructureDefinitions
-
22670
return case data_type_code.downcase
-
when 'domainresource'
-
335
true # we don't have to verify domain resource, because it will be included in the snapshot
-
when 'boolean'
-
156
value==true || value==false || value.downcase=='true' || value.downcase=='false'
-
when 'code'
-
2759
value.is_a?(String) && value.size>=1 && value.size==value.rstrip.size
-
when 'string', 'markdown'
-
4163
value.is_a?(String)
-
when 'xhtml'
-
fragment = Nokogiri::HTML::DocumentFragment.parse(value)
-
value.is_a?(String) && fragment.errors.size == 0
-
when 'base64binary'
-
17
regex = /[^0-9\+\/\=A-Za-z\r\n ]/
-
17
value.is_a?(String) && (regex =~ value).nil?
-
when 'id'
-
387
regex = /[^\d\w\-\.]/
-
# the FHIR spec says IDs have a length limit of 36 characters. But it also says that OIDs
-
# are valid IDs, and ISO OIDs have no length limitations.
-
387
value.is_a?(String) && (regex =~ value).nil? # && value.size<=36
-
when 'oid'
-
14
regex = /[^(urn:oid:)[\d\.]]/
-
14
value.is_a?(String) && (regex =~ value).nil?
-
when 'uri'
-
2277
is_valid_uri = false
-
2277
begin
-
2277
is_valid_uri = !URI.parse(value).nil?
-
rescue Exception
-
is_valid_uri = false
-
end
-
2277
is_valid_uri
-
when 'instant'
-
65
regex = /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))))\Z/
-
65
value.is_a?(String) && !(regex =~ value).nil?
-
when 'date'
-
52
regex = /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?\Z/
-
52
value.is_a?(String) && !(regex =~ value).nil?
-
when 'datetime'
-
228
regex = /\A[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?\Z/
-
228
value.is_a?(String) && !(regex =~ value).nil?
-
when 'time'
-
4
regex = /\A([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?\Z/
-
4
value.is_a?(String) && !(regex =~ value).nil?
-
when 'integer','unsignedint'
-
79
(!Integer(value).nil? rescue false)
-
when 'positiveint'
-
59
(!Integer(value).nil? rescue false) && (Integer(value) >= 0)
-
when 'decimal'
-
192
(!Float(value).nil? rescue false)
-
when 'resource'
-
633
if representation.downcase == 'xml'
-
633
doc = Nokogiri::XML(value)
-
633
contained_resources_valid = true
-
633
doc.root.element_children do |element|
-
element.add_namespace_definition(nil,'http://hl7.org/fhir')
-
contained_resources_valid = contained_resources_valid && is_valid_xml?(element.to_xml)
-
end
-
633
contained_resources_valid
-
elsif representation.downcase == 'json'
-
resource_type = value['resourceType']
-
definition = FHIR::StructureDefinition.get_base_definition(resource_type)
-
if !definition.nil?
-
retVal = definition.is_valid?(value,representation)
-
if !retVal
-
@errors += definition.errors
-
@warnings += definition.warnings
-
end
-
retVal
-
else
-
@errors << "Unable to find base type definition: #{resource_type}"
-
false
-
end
-
else
-
raise Exception.new "is_data_type? unhandled 'resource' DataType with 'resource' representation."
-
end
-
else
-
# Eliminate endless loop on Element is an Element
-
11250
return true if (data_type_code=='Element' && xmlId=='Element')
-
-
11250
definition = FHIR::StructureDefinition.get_type_definition(data_type_code)
-
11250
definition = FHIR::StructureDefinition.get_base_definition(data_type_code) if definition.nil?
-
11250
if !definition.nil?
-
11250
retVal = definition.is_valid?(value,representation)
-
11250
if !retVal
-
@errors += definition.errors
-
@warnings += definition.warnings
-
end
-
11250
retVal
-
else
-
@errors << "Unable to find base type definition: #{data_type_code}"
-
false
-
end
-
end
-
end
-
-
1
def check_binding(element,value)
-
-
1328
vsUri = element.binding.valueSetUri || element.binding.try(:valueSetReference).try(:reference)
-
1328
valueset = FHIR::ValueSet.get_base_valueset(vsUri)
-
-
1328
matching_type = 0
-
-
1328
if vsUri=='http://hl7.org/fhir/ValueSet/content-type' || vsUri=='http://www.rfc-editor.org/bcp/bcp13.txt'
-
24
matches = MIME::Types[value]
-
24
if (matches.nil? || matches.size==0) && !is_some_type_of_xml_or_json(value)
-
1
@errors << "#{element.path} has invalid mime-type: '#{value}'"
-
1
matching_type-=1 if element.binding.strength=='required'
-
end
-
elsif vsUri=='http://tools.ietf.org/html/bcp47'
-
2
hasRegion = (!(value =~ /-/).nil?)
-
2
valid = !BCP47::Language.identify(value).nil? && (!hasRegion || !BCP47::Region.identify(value).nil?)
-
2
if !valid
-
@errors << "#{element.path} has unrecognized language: '#{value}'"
-
matching_type-=1 if element.binding.strength=='required'
-
end
-
elsif valueset.nil?
-
@errors << "#{element.path} has unknown ValueSet: '#{vsUri}'"
-
matching_type-=1 if element.binding.strength=='required'
-
elsif !valueset.include?(value)
-
message = "#{element.path} has invalid code '#{value}' from '#{element.short}'"
-
if element.binding.strength=='required'
-
@errors << message
-
matching_type-=1
-
else
-
@warnings << message
-
end
-
end
-
-
1328
matching_type
-
end
-
-
1
def is_some_type_of_xml_or_json(code)
-
9
m = code.downcase
-
9
return true if m=='xml' || m=='json'
-
3
return true if (m.starts_with?('application/') || m.starts_with?('text/')) && (m.ends_with?('json') || m.ends_with?('xml'))
-
1
return true if (m.starts_with?('application/xml') || m.starts_with?('text/xml'))
-
1
return true if (m.starts_with?('application/json') || m.starts_with?('text/json'))
-
1
false
-
end
-
-
1
private :is_valid_xml?, :is_valid_json?, :get_json_nodes, :is_data_type?, :check_binding, :add_missing_elements, :compare_element_definitions
-
-
end
-
end
-
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class StructureDefinitionFinding
-
# This is not an official FHIR Resource type. It is a data structure used for reporting.
-
1
attr_accessor :resourceType
-
1
attr_accessor :profileIdA
-
1
attr_accessor :profileIdB
-
1
attr_accessor :status
-
1
attr_accessor :path
-
1
attr_accessor :attribute
-
1
attr_accessor :message
-
1
attr_accessor :valueA
-
1
attr_accessor :valueB
-
-
1
def to_s
-
"#{resourceType},#{profileIdA},#{profileIdB},#{path},#{attribute},#{status},#{message},#{valueA},#{valueB}"
-
end
-
-
1
def to_json
-
JSON.pretty_unparse(as_json)
-
end
-
-
1
def from_json(json)
-
obj = FHIR::StructureDefinitionFinding.new
-
if json.is_a? String
-
begin
-
if json.encoding.names.include? 'UTF-8'
-
json.gsub!("\xEF\xBB\xBF".force_encoding('UTF-8'), '') # remove UTF-8 BOM
-
end
-
hash = JSON.parse(json)
-
hash.each do |key,value|
-
obj.send("#{key}=".to_sym,value) if value
-
end
-
rescue Exception => e
-
puts "Failed to parse JSON: #{e.message}"
-
return nil
-
end
-
end
-
obj
-
end
-
-
1
def clone
-
from_json(to_json)
-
end
-
-
1
def warning(path,attribute,message,valueA,valueB)
-
obj = clone
-
obj.status = 'WARNING'
-
obj.path = path
-
obj.attribute = attribute
-
obj.message = message
-
obj.valueA = valueA
-
obj.valueB = valueB
-
obj
-
end
-
-
1
def error(path,attribute,message,valueA,valueB)
-
obj = clone
-
obj.status = 'ERROR'
-
obj.path = path
-
obj.attribute = attribute
-
obj.message = message
-
obj.valueA = valueA
-
obj.valueB = valueB
-
obj
-
end
-
-
end
-
end
-
# Copyright (c) 2011-2015, HL7, Inc & The MITRE Corporation
-
# All rights reserved.
-
#
-
# Redistribution and use in source and binary forms, with or without modification,
-
# are permitted provided that the following conditions are met:
-
#
-
# * Redistributions of source code must retain the above copyright notice, this
-
# list of conditions and the following disclaimer.
-
# * Redistributions in binary form must reproduce the above copyright notice,
-
# this list of conditions and the following disclaimer in the documentation
-
# and/or other materials provided with the distribution.
-
# * Neither the name of HL7 nor the names of its contributors may be used to
-
# endorse or promote products derived from this software without specific
-
# prior written permission.
-
#
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
# POSSIBILITY OF SUCH DAMAGE.
-
-
1
module FHIR
-
1
class ValueSet
-
-
1
@@base_valuesets = nil
-
1
@@v2_tables = nil
-
1
@@v3_codesystems = nil
-
-
1
def self.load_valuesets
-
1360
if @@base_valuesets.nil?
-
1
filename = File.join(File.dirname(__FILE__),'valuesets.xml')
-
1
xml = File.read(filename)
-
1
@@base_valuesets = FHIR::Bundle.from_xml(xml)
-
end
-
1360
if @@v2_tables.nil?
-
1
filename = File.join(File.dirname(__FILE__),'v2-tables.xml')
-
1
xml = File.read(filename)
-
1
@@v2_tables = FHIR::Bundle.from_xml(xml)
-
end
-
1360
if @@v3_codesystems.nil?
-
1
filename = File.join(File.dirname(__FILE__),'v3-codesystems.xml')
-
1
xml = File.read(filename)
-
1
@@v3_codesystems = FHIR::Bundle.from_xml(xml)
-
end
-
end
-
-
1
def self.get_base_valueset(valueset_name)
-
1360
return nil if valueset_name.nil?
-
1360
load_valuesets
-
-
1360
@@base_valuesets.entry.each do |entry|
-
268734
if entry.resourceType == 'ValueSet'
-
268734
if !entry.resource.nil? && (entry.fullUrl == valueset_name || entry.resource.url == valueset_name || entry.resource.name == valueset_name || entry.resource.xmlId == valueset_name || entry.resource.try(:codeSystem).try(:system) == valueset_name)
-
1335
return entry.resource
-
end
-
end
-
end
-
25
@@v2_tables.entry.each do |entry|
-
4550
if entry.resourceType == 'ValueSet'
-
4550
if !entry.resource.nil? && (entry.fullUrl == valueset_name || entry.resource.url == valueset_name || entry.resource.name == valueset_name || entry.resource.xmlId == valueset_name || entry.resource.try(:codeSystem).try(:system) == valueset_name)
-
return entry.resource
-
end
-
end
-
end
-
25
@@v3_codesystems.entry.each do |entry|
-
3704
if entry.resourceType == 'ValueSet'
-
3704
if !entry.resource.nil? && (entry.fullUrl == valueset_name || entry.resource.url == valueset_name || entry.resource.name == valueset_name || entry.resource.xmlId == valueset_name || entry.resource.try(:codeSystem).try(:system) == valueset_name)
-
1
return entry.resource
-
end
-
end
-
end
-
-
nil
-
end
-
-
1
def include?(code)
-
# first, check codeSystems
-
1334
if !codeSystem.nil?
-
1271
codeSystem.concept.each do |concept|
-
4332
return true if concept_include?(concept,code)
-
end
-
end
-
-
# if it wasn't found, need to check compose
-
69
if !compose.nil?
-
63
return true if((compose_import?(compose,code) || compose_include?(compose,code)) && !compose_exclude?(compose,code))
-
end
-
-
# finally, try checking expansion
-
6
if !expansion.nil?
-
return expansion_include?(code)
-
end
-
-
# special cases
-
6
if ['http://hl7.org/fhir/ValueSet/data-types','http://hl7.org/fhir/ValueSet/resource-types'].include?(url)
-
4
return true if code.starts_with?('Reference(') && code.ends_with?(')')
-
4
return true if code=='Resource'
-
end
-
-
4
false
-
end
-
-
1
def concept_include?(concept, code)
-
4483
return false if (concept.nil? || code.nil?)
-
4483
return true if concept.code==code
-
3218
return true if (codeSystem.caseSensitive==false && concept.code.downcase==code.downcase)
-
3218
if !concept.concept.nil?
-
3218
concept.concept.each do |child|
-
151
return true if concept_include?(child,code)
-
end
-
end
-
3209
false
-
end
-
-
# TODO compose_import? won't fetch remote ValueSets
-
1
def compose_import?(compose, code)
-
63
return false if (compose.nil? || compose.import.nil? || code.nil?)
-
63
compose.import.each do |import|
-
4
other = FHIR::ValueSet.get_base_valueset(import)
-
4
return true if !other.nil? && other.include?(code)
-
end
-
61
false
-
end
-
-
1
def compose_include?(compose, code)
-
61
return false if (compose.nil? || compose.include.nil? || code.nil?)
-
61
compose.include.each do |concept|
-
63
concept.concept.each do |c|
-
138
return true if c.code==code
-
103
return true if (!codeSystem.nil? && codeSystem.caseSensitive==false && c.code.downcase==code.downcase)
-
end
-
28
system = FHIR::ValueSet.get_base_valueset(concept.system)
-
28
if !system.nil?
-
28
return true if system.include?(code)
-
end
-
end
-
false
-
end
-
-
1
def compose_exclude?(compose, code)
-
63
return false if (compose.nil? || compose.exclude.nil? || code.nil?)
-
63
compose.exclude.each do |concept|
-
concept.concept.each do |c|
-
return true if c.code==code
-
return true if (!codeSystem.nil? && codeSystem.caseSensitive==false && c.code.downcase==code.downcase)
-
end
-
system = FHIR::ValueSet.get_base_valueset(concept.system)
-
if !system.nil?
-
return true if system.include?(code)
-
end
-
end
-
63
false
-
end
-
-
1
def expansion_include?(code)
-
return false if (expansion.nil? || code.nil?)
-
expansion.contains.each do |contains|
-
return true if contains_include?(contains,code)
-
end
-
false
-
end
-
-
1
def contains_include?(contains,code)
-
return false if (contains.nil? || code.nil?)
-
return true if contains.code==code
-
return true if (!codeSystem.nil? && codeSystem.caseSensitive==false && !contains.code.nil? && contains.code.downcase==code.downcase)
-
if !contains.contains.nil?
-
contains.contains.each do |c|
-
return true if contains_include?(c,code)
-
end
-
end
-
false
-
end
-
-
1
private :concept_include?, :compose_import?, :compose_include?, :compose_exclude?, :expansion_include?, :contains_include?
-
-
end
-
end